| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "browser_action_test_util.h" | 5 #include "browser_action_test_util.h" |
| 6 | 6 |
| 7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 9 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
| 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 11 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" | 11 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" |
| 12 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" | 12 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" |
| 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 13 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
| 14 #import "chrome/browser/ui/cocoa/toolbar_controller.h" | 14 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
| 15 #include "gfx/rect.h" | 15 #include "gfx/rect.h" |
| 16 #include "gfx/size.h" | 16 #include "gfx/size.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 BrowserActionsController* GetController(Browser* browser) { | 20 BrowserActionsController* GetController(Browser* browser) { |
| 21 BrowserWindowCocoa* window = | 21 BrowserWindowCocoa* window = |
| 22 static_cast<BrowserWindowCocoa*>(browser->window()); | 22 static_cast<BrowserWindowCocoa*>(browser->window()); |
| 23 | 23 |
| 24 return [[window->cocoa_controller() toolbarController] | 24 return [[window->cocoa_controller() toolbarController] |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 return !HasPopup(); | 66 return !HasPopup(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { | 69 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { |
| 70 return gfx::Size(NSSizeToCGSize([ExtensionPopupController minPopupSize])); | 70 return gfx::Size(NSSizeToCGSize([ExtensionPopupController minPopupSize])); |
| 71 } | 71 } |
| 72 | 72 |
| 73 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { | 73 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { |
| 74 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize])); | 74 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize])); |
| 75 } | 75 } |
| OLD | NEW |