summaryrefslogtreecommitdiffstats
path: root/ash/shell
diff options
context:
space:
mode:
authorjackhou <jackhou@chromium.org>2014-09-24 03:25:48 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-24 10:26:06 +0000
commit3fdb73284d2b947f3a81ebe81501635b220b4dc1 (patch)
treec937a3398345e043db9eab5f52344d6fa08364ac /ash/shell
parent49128996dac812fa390c092171ab86316b6cb47b (diff)
downloadchromium_src-3fdb73284d2b947f3a81ebe81501635b220b4dc1.zip
chromium_src-3fdb73284d2b947f3a81ebe81501635b220b4dc1.tar.gz
chromium_src-3fdb73284d2b947f3a81ebe81501635b220b4dc1.tar.bz2
Add CanMinimize to classes that implement WidgetDelegate::CanMaximize.
There were some cases where we use CanMaximize to determine if minimization should be disabled. They now use CanMinimize: - custom_frame_view_ash - hwnd_message_handler All classes that implement CanMaximize now implement CanMinimize in the same way, so there should no change in behavior. BUG=328241,341010 Review URL: https://codereview.chromium.org/583603004 Cr-Commit-Position: refs/heads/master@{#296381}
Diffstat (limited to 'ash/shell')
-rw-r--r--ash/shell/panel_window.cc4
-rw-r--r--ash/shell/panel_window.h1
-rw-r--r--ash/shell/toplevel_window.cc4
-rw-r--r--ash/shell/toplevel_window.h1
-rw-r--r--ash/shell/window_type_launcher.cc4
-rw-r--r--ash/shell/window_type_launcher.h1
6 files changed, 15 insertions, 0 deletions
diff --git a/ash/shell/panel_window.cc b/ash/shell/panel_window.cc
index 3a197a3..f092aa8 100644
--- a/ash/shell/panel_window.cc
+++ b/ash/shell/panel_window.cc
@@ -81,6 +81,10 @@ bool PanelWindow::CanMaximize() const {
return false;
}
+bool PanelWindow::CanMinimize() const {
+ return false;
+}
+
views::NonClientFrameView* PanelWindow::CreateNonClientFrameView(
views::Widget* widget) {
return new PanelFrameView(widget, PanelFrameView::FRAME_NONE);
diff --git a/ash/shell/panel_window.h b/ash/shell/panel_window.h
index 2d3a0bd..cee7946 100644
--- a/ash/shell/panel_window.h
+++ b/ash/shell/panel_window.h
@@ -41,6 +41,7 @@ class PanelWindow : public views::WidgetDelegateView {
virtual View* GetContentsView() OVERRIDE;
virtual bool CanResize() const OVERRIDE;
virtual bool CanMaximize() const OVERRIDE;
+ virtual bool CanMinimize() const OVERRIDE;
virtual views::NonClientFrameView* CreateNonClientFrameView(
views::Widget* widget) OVERRIDE;
diff --git a/ash/shell/toplevel_window.cc b/ash/shell/toplevel_window.cc
index 2f620c1..27c96d6 100644
--- a/ash/shell/toplevel_window.cc
+++ b/ash/shell/toplevel_window.cc
@@ -108,5 +108,9 @@ bool ToplevelWindow::CanMaximize() const {
return params_.can_maximize;
}
+bool ToplevelWindow::CanMinimize() const {
+ return params_.can_maximize;
+}
+
} // namespace shell
} // namespace ash
diff --git a/ash/shell/toplevel_window.h b/ash/shell/toplevel_window.h
index 8a31d26..db19d1e 100644
--- a/ash/shell/toplevel_window.h
+++ b/ash/shell/toplevel_window.h
@@ -44,6 +44,7 @@ class ToplevelWindow : public views::WidgetDelegateView {
virtual View* GetContentsView() OVERRIDE;
virtual bool CanResize() const OVERRIDE;
virtual bool CanMaximize() const OVERRIDE;
+ virtual bool CanMinimize() const OVERRIDE;
const CreateParams params_;
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc
index 78e6b0a..cbd2db3 100644
--- a/ash/shell/window_type_launcher.cc
+++ b/ash/shell/window_type_launcher.cc
@@ -299,6 +299,10 @@ bool WindowTypeLauncher::CanMaximize() const {
return true;
}
+bool WindowTypeLauncher::CanMinimize() const {
+ return true;
+}
+
void WindowTypeLauncher::ButtonPressed(views::Button* sender,
const ui::Event& event) {
if (sender == create_button_) {
diff --git a/ash/shell/window_type_launcher.h b/ash/shell/window_type_launcher.h
index 7a088d9..8cd389c 100644
--- a/ash/shell/window_type_launcher.h
+++ b/ash/shell/window_type_launcher.h
@@ -45,6 +45,7 @@ class WindowTypeLauncher : public views::WidgetDelegateView,
virtual bool CanResize() const OVERRIDE;
virtual base::string16 GetWindowTitle() const OVERRIDE;
virtual bool CanMaximize() const OVERRIDE;
+ virtual bool CanMinimize() const OVERRIDE;
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,