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

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: fix updateAppButtonSeverity and rewrap + rebase 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 // Find the center of the bottom of the page action icon. 297 // Find the center of the bottom of the page action icon.
298 arrowPoint = locationBarView->GetPageActionBubblePoint(page_action); 298 arrowPoint = locationBarView->GetPageActionBubblePoint(page_action);
299 } else if (type_ == extension_installed_bubble::kOmniboxKeyword) { 299 } else if (type_ == extension_installed_bubble::kOmniboxKeyword) {
300 LocationBarViewMac* locationBarView = 300 LocationBarViewMac* locationBarView =
301 [window->cocoa_controller() locationBarBridge]; 301 [window->cocoa_controller() locationBarBridge];
302 arrowPoint = locationBarView->GetPageInfoBubblePoint(); 302 arrowPoint = locationBarView->GetPageInfoBubblePoint();
303 } else { 303 } else {
304 DCHECK(type_ == extension_installed_bubble::kBundle || 304 DCHECK(type_ == extension_installed_bubble::kBundle ||
305 type_ == extension_installed_bubble::kGeneric); 305 type_ == extension_installed_bubble::kGeneric);
306 // Point at the bottom of the wrench menu. 306 // Point at the bottom of the app menu.
307 NSView* wrenchButton = 307 NSView* appMenuButton =
308 [[window->cocoa_controller() toolbarController] wrenchButton]; 308 [[window->cocoa_controller() toolbarController] appMenuButton];
309 const NSRect bounds = [wrenchButton bounds]; 309 const NSRect bounds = [appMenuButton bounds];
310 NSPoint anchor = NSMakePoint(NSMidX(bounds), NSMaxY(bounds)); 310 NSPoint anchor = NSMakePoint(NSMidX(bounds), NSMaxY(bounds));
311 arrowPoint = [wrenchButton convertPoint:anchor toView:nil]; 311 arrowPoint = [appMenuButton convertPoint:anchor toView:nil];
312 } 312 }
313 return arrowPoint; 313 return arrowPoint;
314 } 314 }
315 315
316 // Override -[BaseBubbleController showWindow:] to tweak bubble location and 316 // Override -[BaseBubbleController showWindow:] to tweak bubble location and
317 // set up UI elements. 317 // set up UI elements.
318 - (void)showWindow:(id)sender { 318 - (void)showWindow:(id)sender {
319 DCHECK_CURRENTLY_ON(BrowserThread::UI); 319 DCHECK_CURRENTLY_ON(BrowserThread::UI);
320 320
321 // Load nib and calculate height based on messages to be shown. 321 // Load nib and calculate height based on messages to be shown.
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 [self close]; 654 [self close];
655 } 655 }
656 656
657 - (void)awakeFromNib { 657 - (void)awakeFromNib {
658 if (bundle_) 658 if (bundle_)
659 return; 659 return;
660 [self initializeLabel]; 660 [self initializeLabel];
661 } 661 }
662 662
663 @end 663 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698