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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm

Issue 2717603003: [Mac] Make bubble arrow location/position RTL-aware (Closed)
Patch Set: Now with proper enum formatting Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/website_settings/permission_bubble_controller.h " 5 #import "chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h "
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/bind_objc_block.h" 9 #include "base/mac/bind_objc_block.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 - (NSPoint)getExpectedAnchorPoint { 473 - (NSPoint)getExpectedAnchorPoint {
474 return [PermissionBubbleController getAnchorPointForBrowser:browser_]; 474 return [PermissionBubbleController getAnchorPointForBrowser:browser_];
475 } 475 }
476 476
477 - (bool)hasVisibleLocationBar { 477 - (bool)hasVisibleLocationBar {
478 return [PermissionBubbleController hasVisibleLocationBarForBrowser:browser_]; 478 return [PermissionBubbleController hasVisibleLocationBarForBrowser:browser_];
479 } 479 }
480 480
481 - (info_bubble::BubbleArrowLocation)getExpectedArrowLocation { 481 - (info_bubble::BubbleArrowLocation)getExpectedArrowLocation {
482 return info_bubble::kTopLeft; 482 return info_bubble::kTopLeading;
483 } 483 }
484 484
485 - (NSWindow*)getExpectedParentWindow { 485 - (NSWindow*)getExpectedParentWindow {
486 DCHECK(browser_->window()); 486 DCHECK(browser_->window());
487 return browser_->window()->GetNativeWindow(); 487 return browser_->window()->GetNativeWindow();
488 } 488 }
489 489
490 - (NSView*)labelForRequest:(PermissionRequest*)request { 490 - (NSView*)labelForRequest:(PermissionRequest*)request {
491 DCHECK(request); 491 DCHECK(request);
492 base::scoped_nsobject<NSView> permissionView( 492 base::scoped_nsobject<NSView> permissionView(
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 } 646 }
647 647
648 - (IBAction)cancel:(id)sender { 648 - (IBAction)cancel:(id)sender {
649 // This is triggered by ESC when the bubble has focus. 649 // This is triggered by ESC when the bubble has focus.
650 if (delegate_) 650 if (delegate_)
651 delegate_->Closing(); 651 delegate_->Closing();
652 [super cancel:sender]; 652 [super cancel:sender];
653 } 653 }
654 654
655 @end // implementation PermissionBubbleController 655 @end // implementation PermissionBubbleController
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698