| 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 #include "chrome/browser/ui/panels/base_panel_browser_test.h" | 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 struct MockDesktopBar { | 55 struct MockDesktopBar { |
| 56 bool auto_hiding_enabled; | 56 bool auto_hiding_enabled; |
| 57 DisplaySettingsProvider::DesktopBarVisibility visibility; | 57 DisplaySettingsProvider::DesktopBarVisibility visibility; |
| 58 int thickness; | 58 int thickness; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 class MockDisplaySettingsProviderImpl : | 61 class MockDisplaySettingsProviderImpl : |
| 62 public BasePanelBrowserTest::MockDisplaySettingsProvider { | 62 public BasePanelBrowserTest::MockDisplaySettingsProvider { |
| 63 public: | 63 public: |
| 64 explicit MockDisplaySettingsProviderImpl(); | 64 explicit MockDisplaySettingsProviderImpl(); |
| 65 virtual ~MockDisplaySettingsProviderImpl() { } | 65 ~MockDisplaySettingsProviderImpl() override {} |
| 66 | 66 |
| 67 // Overridden from DisplaySettingsProvider: | 67 // Overridden from DisplaySettingsProvider: |
| 68 virtual gfx::Rect GetPrimaryDisplayArea() const override; | 68 gfx::Rect GetPrimaryDisplayArea() const override; |
| 69 virtual gfx::Rect GetPrimaryWorkArea() const override; | 69 gfx::Rect GetPrimaryWorkArea() const override; |
| 70 virtual gfx::Rect GetDisplayAreaMatching( | 70 gfx::Rect GetDisplayAreaMatching(const gfx::Rect& bounds) const override; |
| 71 const gfx::Rect& bounds) const override; | 71 gfx::Rect GetWorkAreaMatching(const gfx::Rect& bounds) const override; |
| 72 virtual gfx::Rect GetWorkAreaMatching( | 72 bool IsAutoHidingDesktopBarEnabled(DesktopBarAlignment alignment) override; |
| 73 const gfx::Rect& bounds) const override; | 73 int GetDesktopBarThickness(DesktopBarAlignment alignment) const override; |
| 74 virtual bool IsAutoHidingDesktopBarEnabled( | 74 DesktopBarVisibility GetDesktopBarVisibility( |
| 75 DesktopBarAlignment alignment) override; | |
| 76 virtual int GetDesktopBarThickness( | |
| 77 DesktopBarAlignment alignment) const override; | 75 DesktopBarAlignment alignment) const override; |
| 78 virtual DesktopBarVisibility GetDesktopBarVisibility( | 76 bool IsFullScreen() override; |
| 79 DesktopBarAlignment alignment) const override; | |
| 80 virtual bool IsFullScreen() override; | |
| 81 | 77 |
| 82 // Overridden from MockDisplaySettingsProvider: | 78 // Overridden from MockDisplaySettingsProvider: |
| 83 virtual void SetPrimaryDisplay( | 79 void SetPrimaryDisplay(const gfx::Rect& display_area, |
| 84 const gfx::Rect& display_area, const gfx::Rect& work_area) override; | 80 const gfx::Rect& work_area) override; |
| 85 virtual void SetSecondaryDisplay( | 81 void SetSecondaryDisplay(const gfx::Rect& display_area, |
| 86 const gfx::Rect& display_area, const gfx::Rect& work_area) override; | 82 const gfx::Rect& work_area) override; |
| 87 virtual void EnableAutoHidingDesktopBar(DesktopBarAlignment alignment, | 83 void EnableAutoHidingDesktopBar(DesktopBarAlignment alignment, |
| 88 bool enabled, | 84 bool enabled, |
| 89 int thickness) override; | 85 int thickness) override; |
| 90 virtual void SetDesktopBarVisibility( | 86 void SetDesktopBarVisibility(DesktopBarAlignment alignment, |
| 91 DesktopBarAlignment alignment, DesktopBarVisibility visibility) override; | 87 DesktopBarVisibility visibility) override; |
| 92 virtual void SetDesktopBarThickness(DesktopBarAlignment alignment, | 88 void SetDesktopBarThickness(DesktopBarAlignment alignment, |
| 93 int thickness) override; | 89 int thickness) override; |
| 94 virtual void EnableFullScreenMode(bool enabled) override; | 90 void EnableFullScreenMode(bool enabled) override; |
| 95 | 91 |
| 96 private: | 92 private: |
| 97 gfx::Rect primary_display_area_; | 93 gfx::Rect primary_display_area_; |
| 98 gfx::Rect primary_work_area_; | 94 gfx::Rect primary_work_area_; |
| 99 gfx::Rect secondary_display_area_; | 95 gfx::Rect secondary_display_area_; |
| 100 gfx::Rect secondary_work_area_; | 96 gfx::Rect secondary_work_area_; |
| 101 MockDesktopBar mock_desktop_bars[3]; | 97 MockDesktopBar mock_desktop_bars[3]; |
| 102 bool full_screen_enabled_; | 98 bool full_screen_enabled_; |
| 103 | 99 |
| 104 DISALLOW_COPY_AND_ASSIGN(MockDisplaySettingsProviderImpl); | 100 DISALLOW_COPY_AND_ASSIGN(MockDisplaySettingsProviderImpl); |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } | 593 } |
| 598 | 594 |
| 599 std::string BasePanelBrowserTest::MakePanelName(int index) { | 595 std::string BasePanelBrowserTest::MakePanelName(int index) { |
| 600 std::string panel_name("Panel"); | 596 std::string panel_name("Panel"); |
| 601 return panel_name + base::IntToString(index); | 597 return panel_name + base::IntToString(index); |
| 602 } | 598 } |
| 603 | 599 |
| 604 bool BasePanelBrowserTest::WmSupportWindowActivation() { | 600 bool BasePanelBrowserTest::WmSupportWindowActivation() { |
| 605 return true; | 601 return true; |
| 606 } | 602 } |
| OLD | NEW |