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

Side by Side Diff: chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm

Issue 2882533003: [Mac] Hover/Active Omnibox Icon States for Secondary UI MD (Closed)
Patch Set: Fixes for tapted Created 3 years, 7 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/page_info/page_info_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 PageInfoBubbleController* controller) { 1266 PageInfoBubbleController* controller) {
1267 bubble_controller_ = controller; 1267 bubble_controller_ = controller;
1268 } 1268 }
1269 1269
1270 void PageInfoUIBridge::Show(gfx::NativeWindow parent, 1270 void PageInfoUIBridge::Show(gfx::NativeWindow parent,
1271 Profile* profile, 1271 Profile* profile,
1272 content::WebContents* web_contents, 1272 content::WebContents* web_contents,
1273 const GURL& virtual_url, 1273 const GURL& virtual_url,
1274 const security_state::SecurityInfo& security_info) { 1274 const security_state::SecurityInfo& security_info) {
1275 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { 1275 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
1276 BrowserWindowController* controller =
1277 [BrowserWindowController browserWindowControllerForWindow:parent];
1278 LocationBarViewMac* locationBar = [controller locationBarBridge];
tapted 2017/05/18 03:40:39 nit: locationBar -> location_bar. and-hm - this d
spqchan 2017/05/19 01:47:28 Done.
1279 LocationBarDecoration* decoration =
1280 locationBar ? locationBar->GetPageInfoDecoration() : nullptr;
1276 chrome::ShowPageInfoBubbleViewsAtPoint( 1281 chrome::ShowPageInfoBubbleViewsAtPoint(
1277 gfx::ScreenPointFromNSPoint(AnchorPointForWindow(parent)), profile, 1282 gfx::ScreenPointFromNSPoint(AnchorPointForWindow(parent)), profile,
1278 web_contents, virtual_url, security_info); 1283 web_contents, virtual_url, security_info, decoration);
1279 return; 1284 return;
1280 } 1285 }
1281 1286
1282 // Don't show the bubble if it's already being shown. Since this method is 1287 // Don't show the bubble if it's already being shown. Since this method is
1283 // called each time the location icon is clicked, each click toggles the 1288 // called each time the location icon is clicked, each click toggles the
1284 // bubble in and out. 1289 // bubble in and out.
1285 if (g_is_bubble_showing) 1290 if (g_is_bubble_showing)
1286 return; 1291 return;
1287 1292
1288 // Create the bridge. This will be owned by the bubble controller. 1293 // Create the bridge. This will be owned by the bubble controller.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 void PageInfoUIBridge::SetCookieInfo(const CookieInfoList& cookie_info_list) { 1329 void PageInfoUIBridge::SetCookieInfo(const CookieInfoList& cookie_info_list) {
1325 [bubble_controller_ setCookieInfo:cookie_info_list]; 1330 [bubble_controller_ setCookieInfo:cookie_info_list];
1326 } 1331 }
1327 1332
1328 void PageInfoUIBridge::SetPermissionInfo( 1333 void PageInfoUIBridge::SetPermissionInfo(
1329 const PermissionInfoList& permission_info_list, 1334 const PermissionInfoList& permission_info_list,
1330 ChosenObjectInfoList chosen_object_info_list) { 1335 ChosenObjectInfoList chosen_object_info_list) {
1331 [bubble_controller_ setPermissionInfo:permission_info_list 1336 [bubble_controller_ setPermissionInfo:permission_info_list
1332 andChosenObjects:std::move(chosen_object_info_list)]; 1337 andChosenObjects:std::move(chosen_object_info_list)];
1333 } 1338 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698