Files
electron/shell/browser/ui/electron_desktop_window_tree_host_linux.h
electron-roller[bot] 9e0a3c44dd chore: bump chromium to 105.0.5187.0 (main) (#34921)
* chore: bump chromium in DEPS to 105.0.5179.0

* chore: update patches

* 3758224: Reland^2 "[flags] Enable freezing of flags"

https://chromium-review.googlesource.com/c/v8/v8/+/3758224

* chore: bump chromium in DEPS to 105.0.5181.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5183.0

* chore: bump chromium in DEPS to 105.0.5185.0

* chore: bump chromium in DEPS to 105.0.5187.0

* chore: update patches

* 3723298: Pass RemoteFrame mojo channels through its creation messages.

https://chromium-review.googlesource.com/c/chromium/src/+/3723298

* 3737382: [Code Heath] Replace base::{ListValue,DictionaryValue} in skia et al

https://chromium-review.googlesource.com/c/chromium/src/+/3737382

* Pass RemoteFrame mojo channels through its creation messages.

 https://chromium-review.googlesource.com/c/chromium/src/+/3723298

* Changed PrintRenderFrame.PrintWithParams mojo interface to use callback.

https://chromium-review.googlesource.com/c/chromium/src/+/3761203

* 3738183: [CSP] Add support for `DisableWasmEval`

https://chromium-review.googlesource.com/c/chromium/src/+/3738183

* 3740498: Move LinuxUI from //ui/views/linux_ui to //ui/linux

https://chromium-review.googlesource.com/c/chromium/src/+/3740498

* 3558277: Moves subsystem and semantics to enum class

https://chromium-review.googlesource.com/c/chromium/src/+/3558277

* chore: fix broken steps-electron-gn-check

* 3749583: [arm64] Fix undefined symbol linker error

https://chromium-review.googlesource.com/c/v8/v8/+/3749583

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-07-20 13:03:34 +02:00

76 lines
2.8 KiB
C++

// Copyright (c) 2021 Ryan Gonzalez.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// Portions of this file are sourced from
// chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.h,
// Copyright (c) 2019 The Chromium Authors,
// which is governed by a BSD-style license
#ifndef ELECTRON_SHELL_BROWSER_UI_ELECTRON_DESKTOP_WINDOW_TREE_HOST_LINUX_H_
#define ELECTRON_SHELL_BROWSER_UI_ELECTRON_DESKTOP_WINDOW_TREE_HOST_LINUX_H_
#include "base/scoped_observation.h"
#include "shell/browser/native_window_views.h"
#include "shell/browser/ui/views/client_frame_view_linux.h"
#include "third_party/skia/include/core/SkRRect.h"
#include "ui/linux/device_scale_factor_observer.h"
#include "ui/native_theme/native_theme_observer.h"
#include "ui/platform_window/platform_window.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
namespace electron {
class ElectronDesktopWindowTreeHostLinux
: public views::DesktopWindowTreeHostLinux,
public ui::NativeThemeObserver,
public ui::DeviceScaleFactorObserver {
public:
ElectronDesktopWindowTreeHostLinux(
NativeWindowViews* native_window_view,
views::DesktopNativeWidgetAura* desktop_native_widget_aura);
~ElectronDesktopWindowTreeHostLinux() override;
// disable copy
ElectronDesktopWindowTreeHostLinux(
const ElectronDesktopWindowTreeHostLinux&) = delete;
ElectronDesktopWindowTreeHostLinux& operator=(
const ElectronDesktopWindowTreeHostLinux&) = delete;
bool SupportsClientFrameShadow() const;
protected:
// views::DesktopWindowTreeHostLinuxImpl:
void OnWidgetInitDone() override;
// ui::PlatformWindowDelegate
void OnBoundsChanged(const BoundsChange& change) override;
void OnWindowStateChanged(ui::PlatformWindowState old_state,
ui::PlatformWindowState new_state) override;
// ui::NativeThemeObserver:
void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;
// views::OnDeviceScaleFactorChanged:
void OnDeviceScaleFactorChanged() override;
private:
void UpdateFrameHints();
void UpdateClientDecorationHints(ClientFrameViewLinux* view);
void UpdateWindowState(ui::PlatformWindowState new_state);
NativeWindowViews* native_window_view_; // weak ref
base::ScopedObservation<ui::NativeTheme, ui::NativeThemeObserver>
theme_observation_{this};
base::ScopedObservation<ui::LinuxUi,
ui::DeviceScaleFactorObserver,
&ui::LinuxUi::AddDeviceScaleFactorObserver,
&ui::LinuxUi::RemoveDeviceScaleFactorObserver>
scale_observation_{this};
ui::PlatformWindowState window_state_ = ui::PlatformWindowState::kUnknown;
};
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_UI_ELECTRON_DESKTOP_WINDOW_TREE_HOST_LINUX_H_