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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.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/extensions/extension_action_platform_delegate_c ocoa.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_c ocoa.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 void ExtensionActionPlatformDelegateCocoa::ShowPopup( 71 void ExtensionActionPlatformDelegateCocoa::ShowPopup(
72 std::unique_ptr<extensions::ExtensionViewHost> host, 72 std::unique_ptr<extensions::ExtensionViewHost> host,
73 bool grant_tab_permissions, 73 bool grant_tab_permissions,
74 ExtensionActionViewController::PopupShowAction show_action) { 74 ExtensionActionViewController::PopupShowAction show_action) {
75 BOOL devMode = 75 BOOL devMode =
76 show_action == ExtensionActionViewController::SHOW_POPUP_AND_INSPECT; 76 show_action == ExtensionActionViewController::SHOW_POPUP_AND_INSPECT;
77 [ExtensionPopupController host:std::move(host) 77 [ExtensionPopupController host:std::move(host)
78 inBrowser:controller_->browser() 78 inBrowser:controller_->browser()
79 anchoredAt:GetPopupPoint() 79 anchoredAt:GetPopupPoint()
80 arrowLocation:info_bubble::kTopRight 80 arrowLocation:info_bubble::kTopTrailing
81 devMode:devMode]; 81 devMode:devMode];
82 } 82 }
83 83
84 void ExtensionActionPlatformDelegateCocoa::CloseOverflowMenu() { 84 void ExtensionActionPlatformDelegateCocoa::CloseOverflowMenu() {
85 // If this was triggered by an action overflowed to the app menu, then the app 85 // If this was triggered by an action overflowed to the app menu, then the app
86 // menu will be open. Close it before opening the popup. 86 // menu will be open. Close it before opening the popup.
87 AppMenuController* appMenuController = 87 AppMenuController* appMenuController =
88 [[[BrowserWindowController 88 [[[BrowserWindowController
89 browserWindowControllerForWindow: 89 browserWindowControllerForWindow:
90 controller_->browser()->window()->GetNativeWindow()] 90 controller_->browser()->window()->GetNativeWindow()]
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 controller_->IsEnabled( 132 controller_->IsEnabled(
133 controller_->view_delegate()->GetCurrentWebContents())) { 133 controller_->view_delegate()->GetCurrentWebContents())) {
134 controller_->ExecuteAction(true); 134 controller_->ExecuteAction(true);
135 } 135 }
136 break; 136 break;
137 } 137 }
138 default: 138 default:
139 NOTREACHED() << "Unexpected notification"; 139 NOTREACHED() << "Unexpected notification";
140 } 140 }
141 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698