OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |