| 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 "chrome/browser/extensions/browser_action_test_util.h" | 5 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 GetContainer(browser_, test_helper_.get()); | 193 GetContainer(browser_, test_helper_.get()); |
| 194 container->SetSize(gfx::Size(width, container->height())); | 194 container->SetSize(gfx::Size(width, container->height())); |
| 195 } | 195 } |
| 196 | 196 |
| 197 ToolbarActionsBar* BrowserActionTestUtil::GetToolbarActionsBar() { | 197 ToolbarActionsBar* BrowserActionTestUtil::GetToolbarActionsBar() { |
| 198 return GetContainer(browser_, test_helper_.get())->toolbar_actions_bar(); | 198 return GetContainer(browser_, test_helper_.get())->toolbar_actions_bar(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 std::unique_ptr<BrowserActionTestUtil> | 201 std::unique_ptr<BrowserActionTestUtil> |
| 202 BrowserActionTestUtil::CreateOverflowBar() { | 202 BrowserActionTestUtil::CreateOverflowBar() { |
| 203 CHECK(!GetToolbarActionsBar()->in_overflow_mode()) | 203 // Only a main bar can create an overflow bar! |
| 204 << "Only a main bar can create an overflow bar!"; | 204 CHECK(!GetToolbarActionsBar()->in_overflow_mode()); |
| 205 return base::WrapUnique(new BrowserActionTestUtil(browser_, this)); | 205 return base::WrapUnique(new BrowserActionTestUtil(browser_, this)); |
| 206 } | 206 } |
| 207 | 207 |
| 208 // static | 208 // static |
| 209 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { | 209 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { |
| 210 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); | 210 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); |
| 211 } | 211 } |
| 212 | 212 |
| 213 // static | 213 // static |
| 214 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { | 214 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { |
| 215 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); | 215 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); |
| 216 } | 216 } |
| 217 | 217 |
| 218 BrowserActionTestUtil::BrowserActionTestUtil(Browser* browser, | 218 BrowserActionTestUtil::BrowserActionTestUtil(Browser* browser, |
| 219 BrowserActionTestUtil* main_bar) | 219 BrowserActionTestUtil* main_bar) |
| 220 : browser_(browser), | 220 : browser_(browser), |
| 221 test_helper_(new TestToolbarActionsBarHelperViews( | 221 test_helper_(new TestToolbarActionsBarHelperViews( |
| 222 browser_, | 222 browser_, |
| 223 GetContainer(browser_, main_bar->test_helper_.get()))) { | 223 GetContainer(browser_, main_bar->test_helper_.get()))) { |
| 224 } | 224 } |
| OLD | NEW |