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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn nit Created 5 years, 3 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
« no previous file with comments | « chrome/browser/ui/chrome_bubble_manager.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_window_controller_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/bind_objc_block.h" 10 #include "base/mac/bind_objc_block.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 [self updateLayoutParameters:layout]; 228 [self updateLayoutParameters:layout];
229 [self applyLayout:layout]; 229 [self applyLayout:layout];
230 230
231 [toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]]; 231 [toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]];
232 232
233 // Will update the location of the permission bubble when showing/hiding the 233 // Will update the location of the permission bubble when showing/hiding the
234 // top level toolbar in fullscreen. 234 // top level toolbar in fullscreen.
235 PermissionBubbleManager* manager = [self permissionBubbleManager]; 235 PermissionBubbleManager* manager = [self permissionBubbleManager];
236 if (manager) 236 if (manager)
237 manager->UpdateAnchorPosition(); 237 manager->UpdateAnchorPosition();
238
239 browser_->GetBubbleManager()->UpdateAllBubbleAnchors();
238 } 240 }
239 241
240 - (void)applyTabStripLayout:(const chrome::TabStripLayout&)layout { 242 - (void)applyTabStripLayout:(const chrome::TabStripLayout&)layout {
241 // Update the presence of the window controls. 243 // Update the presence of the window controls.
242 if (layout.addCustomWindowControls) 244 if (layout.addCustomWindowControls)
243 [tabStripController_ addCustomWindowControls]; 245 [tabStripController_ addCustomWindowControls];
244 else 246 else
245 [tabStripController_ removeCustomWindowControls]; 247 [tabStripController_ removeCustomWindowControls];
246 248
247 // Update the layout of the avatar. 249 // Update the layout of the avatar.
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 return browser_->tab_strip_model()->GetActiveWebContents(); 1160 return browser_->tab_strip_model()->GetActiveWebContents();
1159 } 1161 }
1160 1162
1161 - (PermissionBubbleManager*)permissionBubbleManager { 1163 - (PermissionBubbleManager*)permissionBubbleManager {
1162 if (WebContents* contents = [self webContents]) 1164 if (WebContents* contents = [self webContents])
1163 return PermissionBubbleManager::FromWebContents(contents); 1165 return PermissionBubbleManager::FromWebContents(contents);
1164 return nil; 1166 return nil;
1165 } 1167 }
1166 1168
1167 @end // @implementation BrowserWindowController(Private) 1169 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_bubble_manager.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698