Files
electron/shell/browser/ui/electron_desktop_window_tree_host_linux.h
electron-roller[bot] ea6f873f97 chore: bump chromium to 109.0.5382.0 (main) (#36057)
* chore: bump chromium in DEPS to 109.0.5364.0

* chore: update patches

* chore: bump chromium in DEPS to 109.0.5366.0

* chore: update patches

* i3940364: Change PermissionType::WINDOW_PLACEMENT to WINDOW_MANAGEMENT

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

* 3866812: Change content::PluginList to only run on the UI thread.

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

* chore: bump chromium in DEPS to 109.0.5368.0

* [cleanup] Replace enable_basic_printing with enable_printing

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

* chore: update patches

* 3956318: Desktop PWAs: Retire kWebAppWindowControlsOverlay flag

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

* fixup! Change content::PluginList to only run on the UI thread.

(cherry picked from commit 7b5ec87d4f)
Co-Authored-By: Robo <hop2deep@gmail.com>

* chore: bump chromium in DEPS to 109.0.5370.0

* 3956299: Quota: Cleanup QuotaPermissionContext

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

* chore: update patches

* 3803867: Add Mojo interface to parse XML for OOP printer capabilities

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

* fixup: Add Mojo interface to parse XML for OOP printer capabilities

* chore: bump chromium in DEPS to 109.0.5372.0

* chore: update patches

* chore: bump chromium in DEPS to 109.0.5374.0

* chore: bump chromium in DEPS to 109.0.5376.0

* chore: bump chromium in DEPS to 109.0.5378.0

* chore: update patches

* Quota: Cleanup kPersistent in BrowsingDataRemover

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

* 3955976: serial: Create DOMException with V8ThrowDOMException

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

* 3758405: Append trailer data to serialized messages.

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

* chore: revert clang roll

This patch reverts https://chromium-review.googlesource.com/c/chromium/src/+/3967491
because that roll breaks the WOA build: https://crbug.com/1377819

* chore: update patches

* chore: bump chromium in DEPS to 109.0.5380.0

* chore: update patches

* 3859750: [linux/wayland] Added plumbing for the state of tiled edges.

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

Also 3970920: [linux/wayland] Fixed the tiled edges for the GTK frame.

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

* chore: bump chromium in DEPS to 109.0.5382.0

* chore: update patches

* chore: revert Use accessibility.pkey when setting page access.

https://chromium-review.googlesource.com/c/chromium/src/+/3949281
breaks our Linux builds run under Docker.

This patch should be removed once
https://chromium-review.googlesource.com/c/chromium/src/+/3949284
is merged.

* 3976312: Roll clang llvmorg-16-init-8189-g97196a2d-2 : llvmorg-16-init-8697-g60809cd2-1

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

* 3967841: [heap] Remove AllocationSpace::MAP_SPACE enum constant

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

* 3956131: [cleanup] Remove flag for Wasm threads & atomics

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

* chore: update docs for Quota: Cleanup kPersistent in BrowsingDataRemover

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

* test: fixup HID test for ARM CI

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
2022-10-27 12:37:04 -04:00

77 lines
2.9 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;
void OnWindowTiledStateChanged(ui::WindowTiledEdges new_tiled_edges) 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_