OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
6 #define CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ | 6 #define CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/ui/panels/display_settings_provider.h" | 10 #include "chrome/browser/ui/panels/display_settings_provider.h" |
11 #include "chrome/browser/ui/panels/panel.h" | 11 #include "chrome/browser/ui/panels/panel.h" |
12 #include "chrome/browser/ui/panels/panel_manager.h" | 12 #include "chrome/browser/ui/panels/panel_manager.h" |
13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
14 #include "extensions/common/extension.h" | 14 #include "extensions/common/extension.h" |
15 #include "extensions/common/manifest.h" | 15 #include "extensions/common/manifest.h" |
16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
17 | 17 |
18 class NativePanelTesting; | 18 class NativePanelTesting; |
19 class StackedPanelCollection; | 19 class StackedPanelCollection; |
20 | 20 |
21 class BasePanelBrowserTest : public InProcessBrowserTest { | 21 class BasePanelBrowserTest : public InProcessBrowserTest { |
22 public: | 22 public: |
23 class MockDisplaySettingsProvider : public DisplaySettingsProvider { | 23 class MockDisplaySettingsProvider : public DisplaySettingsProvider { |
24 public: | 24 public: |
25 MockDisplaySettingsProvider() { } | 25 MockDisplaySettingsProvider() { } |
26 virtual ~MockDisplaySettingsProvider() { } | 26 ~MockDisplaySettingsProvider() override {} |
27 | 27 |
28 virtual void SetPrimaryDisplay( | 28 virtual void SetPrimaryDisplay( |
29 const gfx::Rect& display_area, const gfx::Rect& work_area) = 0; | 29 const gfx::Rect& display_area, const gfx::Rect& work_area) = 0; |
30 virtual void SetSecondaryDisplay( | 30 virtual void SetSecondaryDisplay( |
31 const gfx::Rect& display_area, const gfx::Rect& work_area) = 0; | 31 const gfx::Rect& display_area, const gfx::Rect& work_area) = 0; |
32 virtual void EnableAutoHidingDesktopBar(DesktopBarAlignment alignment, | 32 virtual void EnableAutoHidingDesktopBar(DesktopBarAlignment alignment, |
33 bool enabled, | 33 bool enabled, |
34 int thickness) = 0; | 34 int thickness) = 0; |
35 virtual void SetDesktopBarVisibility(DesktopBarAlignment alignment, | 35 virtual void SetDesktopBarVisibility(DesktopBarAlignment alignment, |
36 DesktopBarVisibility visibility) = 0; | 36 DesktopBarVisibility visibility) = 0; |
37 virtual void SetDesktopBarThickness(DesktopBarAlignment alignment, | 37 virtual void SetDesktopBarThickness(DesktopBarAlignment alignment, |
38 int thickness) = 0; | 38 int thickness) = 0; |
39 virtual void EnableFullScreenMode(bool enabled) = 0; | 39 virtual void EnableFullScreenMode(bool enabled) = 0; |
40 }; | 40 }; |
41 | 41 |
42 BasePanelBrowserTest(); | 42 BasePanelBrowserTest(); |
43 virtual ~BasePanelBrowserTest(); | 43 virtual ~BasePanelBrowserTest(); |
44 | 44 |
45 virtual void SetUpCommandLine(base::CommandLine* command_line) override; | 45 void SetUpCommandLine(base::CommandLine* command_line) override; |
46 virtual void SetUpOnMainThread() override; | 46 void SetUpOnMainThread() override; |
47 | 47 |
48 protected: | 48 protected: |
49 enum ActiveState { SHOW_AS_ACTIVE, SHOW_AS_INACTIVE }; | 49 enum ActiveState { SHOW_AS_ACTIVE, SHOW_AS_INACTIVE }; |
50 | 50 |
51 struct CreatePanelParams { | 51 struct CreatePanelParams { |
52 std::string name; | 52 std::string name; |
53 gfx::Rect bounds; | 53 gfx::Rect bounds; |
54 ActiveState show_flag; | 54 ActiveState show_flag; |
55 GURL url; | 55 GURL url; |
56 bool wait_for_fully_created; | 56 bool wait_for_fully_created; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 static const base::FilePath::CharType* kTestDir; | 116 static const base::FilePath::CharType* kTestDir; |
117 | 117 |
118 private: | 118 private: |
119 // Passed to and owned by PanelManager. | 119 // Passed to and owned by PanelManager. |
120 MockDisplaySettingsProvider* mock_display_settings_provider_; | 120 MockDisplaySettingsProvider* mock_display_settings_provider_; |
121 | 121 |
122 bool mock_display_settings_enabled_; | 122 bool mock_display_settings_enabled_; |
123 }; | 123 }; |
124 | 124 |
125 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ | 125 #endif // CHROME_BROWSER_UI_PANELS_BASE_PANEL_BROWSER_TEST_H_ |
OLD | NEW |