Commit e7b8d9f4 authored by Mike Wasserman's avatar Mike Wasserman Committed by Commit Bot

Remove obsolete ShouldHandleSystemCommands function.

This was added to support closing the app list bubble on Windows.
At the time, Windows bubbles were constructed of two nested HWNDs.
The app list bubble no longer exists and bubbles are now one HWND.

Bug: 189112
Test: No Min/Max/Restore/Close windows system command behavior changes.
Change-Id: I0a3ead068a54cb7c2a3ba44c4b7af7e38bcba2a7
Reviewed-on: https://chromium-review.googlesource.com/924315Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537480}
parent 8a5b85bd
......@@ -356,10 +356,6 @@ const char* AppListView::GetClassName() const {
return "AppListView";
}
bool AppListView::ShouldHandleSystemCommands() const {
return true;
}
class AppListView::FullscreenWidgetObserver : views::WidgetObserver {
public:
explicit FullscreenWidgetObserver(app_list::AppListView* view)
......
......@@ -129,7 +129,6 @@ class APP_LIST_EXPORT AppListView : public views::WidgetDelegateView,
const char* GetClassName() const override;
// WidgetDelegate overrides:
bool ShouldHandleSystemCommands() const override;
ax::mojom::Role GetAccessibleWindowRole() const override;
// Overridden from views::View:
......
......@@ -718,10 +718,6 @@ gfx::NativeViewAccessible DesktopWindowTreeHostWin::GetNativeViewAccessible() {
: nullptr;
}
bool DesktopWindowTreeHostWin::ShouldHandleSystemCommands() const {
return GetWidget()->widget_delegate()->ShouldHandleSystemCommands();
}
void DesktopWindowTreeHostWin::HandleAppDeactivated() {
native_widget_delegate_->SetAlwaysRenderAsActive(false);
}
......
......@@ -163,7 +163,6 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
gfx::Size DIPToScreenSize(const gfx::Size& dip_size) const override;
void ResetWindowControls() override;
gfx::NativeViewAccessible GetNativeViewAccessible() override;
bool ShouldHandleSystemCommands() const override;
void HandleAppDeactivated() override;
void HandleActivationChanged(bool active) override;
bool HandleAppCommand(short command) override;
......
......@@ -94,14 +94,6 @@ bool WidgetDelegate::ShouldShowCloseButton() const {
return true;
}
bool WidgetDelegate::ShouldHandleSystemCommands() const {
const Widget* widget = GetWidget();
if (!widget)
return false;
return widget->non_client_view() != NULL;
}
gfx::ImageSkia WidgetDelegate::GetWindowAppIcon() {
// Use the window icon as app icon by default.
return GetWindowIcon();
......
......@@ -86,10 +86,6 @@ class VIEWS_EXPORT WidgetDelegate {
// Returns true if the window should show a close button in the title bar.
virtual bool ShouldShowCloseButton() const;
// Returns true if the window should handle standard system commands, such as
// close, minimize, maximize.
virtual bool ShouldHandleSystemCommands() const;
// Returns the app icon for the window. On Windows, this is the ICON_BIG used
// in Alt-Tab list and Win7's taskbar.
virtual gfx::ImageSkia GetWindowAppIcon();
......
......@@ -2222,9 +2222,6 @@ void HWNDMessageHandler::OnSize(UINT param, const gfx::Size& size) {
void HWNDMessageHandler::OnSysCommand(UINT notification_code,
const gfx::Point& point) {
if (!delegate_->ShouldHandleSystemCommands())
return;
// Windows uses the 4 lower order bits of |notification_code| for type-
// specific information so we must exclude this when comparing.
static const int sc_mask = 0xFFF0;
......
......@@ -104,12 +104,6 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0;
// Returns true if the window should handle standard system commands, such as
// close, minimize, maximize.
// TODO(benwells): Remove this once bubbles don't have two widgets
// implementing them on non-aura windows. http://crbug.com/189112.
virtual bool ShouldHandleSystemCommands() const = 0;
// TODO(beng): Investigate migrating these methods to On* prefixes once
// HWNDMessageHandler is the WindowImpl.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment