Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_action_test_util_mac.mm

Issue 869873008: [Extensions Toolbar] Move some popup logic to be platform-agnostic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avi's Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/extensions/browser_action_test_util.h" 5 #include "chrome/browser/extensions/browser_action_test_util.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" 10 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 bool BrowserActionTestUtil::OverflowedActionButtonWantsToRun() { 134 bool BrowserActionTestUtil::OverflowedActionButtonWantsToRun() {
135 NSView* wrench = [[[BrowserWindowController browserWindowControllerForWindow: 135 NSView* wrench = [[[BrowserWindowController browserWindowControllerForWindow:
136 browser_->window()->GetNativeWindow()] toolbarController] wrenchButton]; 136 browser_->window()->GetNativeWindow()] toolbarController] wrenchButton];
137 NSButton* wrenchButton = base::mac::ObjCCastStrict<NSButton>(wrench); 137 NSButton* wrenchButton = base::mac::ObjCCastStrict<NSButton>(wrench);
138 WrenchToolbarButtonCell* cell = 138 WrenchToolbarButtonCell* cell =
139 base::mac::ObjCCastStrict<WrenchToolbarButtonCell>([wrenchButton cell]); 139 base::mac::ObjCCastStrict<WrenchToolbarButtonCell>([wrenchButton cell]);
140 return [cell overflowedToolbarActionWantsToRun]; 140 return [cell overflowedToolbarActionWantsToRun];
141 } 141 }
142 142
143 ToolbarActionsBar* BrowserActionTestUtil::GetToolbarActionsBar() {
144 return [GetController(browser_, bar_delegate_) toolbarActionsBar];
145 }
146
143 // static 147 // static
144 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { 148 gfx::Size BrowserActionTestUtil::GetMinPopupSize() {
145 return gfx::Size(NSSizeToCGSize([ExtensionPopupController minPopupSize])); 149 return gfx::Size(NSSizeToCGSize([ExtensionPopupController minPopupSize]));
146 } 150 }
147 151
148 // static 152 // static
149 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { 153 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() {
150 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize])); 154 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize]));
151 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698