OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/accelerators/accelerator_commands.h" | 5 #include "ash/accelerators/accelerator_commands.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 using testing::Values; | 26 using testing::Values; |
27 using testing::WithParamInterface; | 27 using testing::WithParamInterface; |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // WidgetDelegateView which allows the widget to be maximized. | 31 // WidgetDelegateView which allows the widget to be maximized. |
32 class MaximizableWidgetDelegate : public views::WidgetDelegateView { | 32 class MaximizableWidgetDelegate : public views::WidgetDelegateView { |
33 public: | 33 public: |
34 MaximizableWidgetDelegate() { | 34 MaximizableWidgetDelegate() { |
35 } | 35 } |
36 virtual ~MaximizableWidgetDelegate() { | 36 ~MaximizableWidgetDelegate() override {} |
37 } | |
38 | 37 |
39 virtual bool CanMaximize() const override { | 38 bool CanMaximize() const override { return true; } |
40 return true; | |
41 } | |
42 | 39 |
43 private: | 40 private: |
44 DISALLOW_COPY_AND_ASSIGN(MaximizableWidgetDelegate); | 41 DISALLOW_COPY_AND_ASSIGN(MaximizableWidgetDelegate); |
45 }; | 42 }; |
46 | 43 |
47 // Returns true if |window_state|'s window is in immersive fullscreen. Infer | 44 // Returns true if |window_state|'s window is in immersive fullscreen. Infer |
48 // whether the window is in immersive fullscreen based on whether the shelf is | 45 // whether the window is in immersive fullscreen based on whether the shelf is |
49 // hidden when the window is fullscreen. (This is not quite right because the | 46 // hidden when the window is fullscreen. (This is not quite right because the |
50 // shelf is hidden if a window is in both immersive fullscreen and tab | 47 // shelf is hidden if a window is in both immersive fullscreen and tab |
51 // fullscreen.) | 48 // fullscreen.) |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 CloseAppWindow(app_window); | 325 CloseAppWindow(app_window); |
329 } | 326 } |
330 } | 327 } |
331 | 328 |
332 INSTANTIATE_TEST_CASE_P(InitiallyRestored, | 329 INSTANTIATE_TEST_CASE_P(InitiallyRestored, |
333 AcceleratorCommandsPlatformAppFullscreenBrowserTest, | 330 AcceleratorCommandsPlatformAppFullscreenBrowserTest, |
334 Values(ui::SHOW_STATE_NORMAL)); | 331 Values(ui::SHOW_STATE_NORMAL)); |
335 INSTANTIATE_TEST_CASE_P(InitiallyMaximized, | 332 INSTANTIATE_TEST_CASE_P(InitiallyMaximized, |
336 AcceleratorCommandsPlatformAppFullscreenBrowserTest, | 333 AcceleratorCommandsPlatformAppFullscreenBrowserTest, |
337 Values(ui::SHOW_STATE_MAXIMIZED)); | 334 Values(ui::SHOW_STATE_MAXIMIZED)); |
OLD | NEW |