| 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.h" | 10 #include "base/message_loop.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 DesktopBarAlignment alignment, int thickness) { | 171 DesktopBarAlignment alignment, int thickness) { |
| 172 MockDesktopBar* bar = &(mock_desktop_bars[static_cast<int>(alignment)]); | 172 MockDesktopBar* bar = &(mock_desktop_bars[static_cast<int>(alignment)]); |
| 173 if (!bar->auto_hiding_enabled) | 173 if (!bar->auto_hiding_enabled) |
| 174 return; | 174 return; |
| 175 if (thickness == bar->thickness) | 175 if (thickness == bar->thickness) |
| 176 return; | 176 return; |
| 177 bar->thickness = thickness; | 177 bar->thickness = thickness; |
| 178 OnAutoHidingDesktopBarChanged(); | 178 OnAutoHidingDesktopBarChanged(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 bool ExistsPanel(Panel* panel) { | |
| 182 std::vector<Panel*> panels = PanelManager::GetInstance()->panels(); | |
| 183 return std::find(panels.begin(), panels.end(), panel) != panels.end(); | |
| 184 } | |
| 185 | |
| 186 } // namespace | 181 } // namespace |
| 187 | 182 |
| 188 const FilePath::CharType* BasePanelBrowserTest::kTestDir = | 183 const FilePath::CharType* BasePanelBrowserTest::kTestDir = |
| 189 FILE_PATH_LITERAL("panels"); | 184 FILE_PATH_LITERAL("panels"); |
| 190 | 185 |
| 191 BasePanelBrowserTest::BasePanelBrowserTest() | 186 BasePanelBrowserTest::BasePanelBrowserTest() |
| 192 : InProcessBrowserTest(), | 187 : InProcessBrowserTest(), |
| 193 mock_display_settings_enabled_(true) { | 188 mock_display_settings_enabled_(true) { |
| 194 } | 189 } |
| 195 | 190 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 } | 463 } |
| 469 | 464 |
| 470 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { | 465 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { |
| 471 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); | 466 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); |
| 472 } | 467 } |
| 473 | 468 |
| 474 std::string BasePanelBrowserTest::MakePanelName(int index) { | 469 std::string BasePanelBrowserTest::MakePanelName(int index) { |
| 475 std::string panel_name("Panel"); | 470 std::string panel_name("Panel"); |
| 476 return panel_name + base::IntToString(index); | 471 return panel_name + base::IntToString(index); |
| 477 } | 472 } |
| OLD | NEW |