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

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

Issue 1508853008: chrome: rename more wrench/Wrench occurrencies to appMenu/AppMenu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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) 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 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle r.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle r.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 // Find the center of the bottom of the page action icon. 296 // Find the center of the bottom of the page action icon.
297 arrowPoint = locationBarView->GetPageActionBubblePoint(page_action); 297 arrowPoint = locationBarView->GetPageActionBubblePoint(page_action);
298 } else if (type_ == extension_installed_bubble::kOmniboxKeyword) { 298 } else if (type_ == extension_installed_bubble::kOmniboxKeyword) {
299 LocationBarViewMac* locationBarView = 299 LocationBarViewMac* locationBarView =
300 [window->cocoa_controller() locationBarBridge]; 300 [window->cocoa_controller() locationBarBridge];
301 arrowPoint = locationBarView->GetPageInfoBubblePoint(); 301 arrowPoint = locationBarView->GetPageInfoBubblePoint();
302 } else { 302 } else {
303 DCHECK(type_ == extension_installed_bubble::kBundle || 303 DCHECK(type_ == extension_installed_bubble::kBundle ||
304 type_ == extension_installed_bubble::kGeneric); 304 type_ == extension_installed_bubble::kGeneric);
305 // Point at the bottom of the wrench menu. 305 // Point at the bottom of the app menu.
306 NSView* wrenchButton = 306 NSView* appMenuButton =
307 [[window->cocoa_controller() toolbarController] wrenchButton]; 307 [[window->cocoa_controller() toolbarController] appMenuButton];
308 const NSRect bounds = [wrenchButton bounds]; 308 const NSRect bounds = [appMenuButton bounds];
309 NSPoint anchor = NSMakePoint(NSMidX(bounds), NSMaxY(bounds)); 309 NSPoint anchor = NSMakePoint(NSMidX(bounds), NSMaxY(bounds));
310 arrowPoint = [wrenchButton convertPoint:anchor toView:nil]; 310 arrowPoint = [appMenuButton convertPoint:anchor toView:nil];
311 } 311 }
312 return arrowPoint; 312 return arrowPoint;
313 } 313 }
314 314
315 // Override -[BaseBubbleController showWindow:] to tweak bubble location and 315 // Override -[BaseBubbleController showWindow:] to tweak bubble location and
316 // set up UI elements. 316 // set up UI elements.
317 - (void)showWindow:(id)sender { 317 - (void)showWindow:(id)sender {
318 DCHECK_CURRENTLY_ON(BrowserThread::UI); 318 DCHECK_CURRENTLY_ON(BrowserThread::UI);
319 319
320 // Load nib and calculate height based on messages to be shown. 320 // Load nib and calculate height based on messages to be shown.
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 [self close]; 653 [self close];
654 } 654 }
655 655
656 - (void)awakeFromNib { 656 - (void)awakeFromNib {
657 if (bundle_) 657 if (bundle_)
658 return; 658 return;
659 [self initializeLabel]; 659 [self initializeLabel];
660 } 660 }
661 661
662 @end 662 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698