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

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

Issue 1140223003: [PermissionBubble] identical ctor across platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permbubble
Patch Set: Fixed nullptr/NULL/nil issues Created 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 // No need to remove previous bubble. It will close itself. 1271 // No need to remove previous bubble. It will close itself.
1272 PermissionBubbleManager* manager(nullptr); 1272 PermissionBubbleManager* manager(nullptr);
1273 if (oldContents) { 1273 if (oldContents) {
1274 manager = PermissionBubbleManager::FromWebContents(oldContents); 1274 manager = PermissionBubbleManager::FromWebContents(oldContents);
1275 if (manager) 1275 if (manager)
1276 manager->SetView(nullptr); 1276 manager->SetView(nullptr);
1277 } 1277 }
1278 1278
1279 if (newContents) { 1279 if (newContents) {
1280 if (!permissionBubbleCocoa_.get()) { 1280 if (!permissionBubbleCocoa_.get()) {
1281 permissionBubbleCocoa_.reset(new PermissionBubbleCocoa([self window])); 1281 DCHECK(browser_.get());
1282 permissionBubbleCocoa_.reset(new PermissionBubbleCocoa(browser_.get()));
1282 } 1283 }
1283 manager = PermissionBubbleManager::FromWebContents(newContents); 1284 manager = PermissionBubbleManager::FromWebContents(newContents);
1284 if (manager) 1285 if (manager)
1285 manager->SetView(permissionBubbleCocoa_.get()); 1286 manager->SetView(permissionBubbleCocoa_.get());
1286 } 1287 }
1287 } 1288 }
1288 1289
1289 - (void)zoomChangedForActiveTab:(BOOL)canShowBubble { 1290 - (void)zoomChangedForActiveTab:(BOOL)canShowBubble {
1290 [toolbarController_ zoomChangedForActiveTab:canShowBubble]; 1291 [toolbarController_ zoomChangedForActiveTab:canShowBubble];
1291 } 1292 }
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 2232
2232 - (BOOL)supportsBookmarkBar { 2233 - (BOOL)supportsBookmarkBar {
2233 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2234 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2234 } 2235 }
2235 2236
2236 - (BOOL)isTabbedWindow { 2237 - (BOOL)isTabbedWindow {
2237 return browser_->is_type_tabbed(); 2238 return browser_->is_type_tabbed();
2238 } 2239 }
2239 2240
2240 @end // @implementation BrowserWindowController(WindowType) 2241 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698