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

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

Issue 1130603005: [PermissionBubble] Remove bubble from previous manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Managers can be NULL at shutdown - account for that. 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
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 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 323 }
324 324
325 void BrowserWindowCocoa::SetTranslateIconToggled(bool is_lit) { 325 void BrowserWindowCocoa::SetTranslateIconToggled(bool is_lit) {
326 [controller_ setCurrentPageIsTranslated:is_lit]; 326 [controller_ setCurrentPageIsTranslated:is_lit];
327 } 327 }
328 328
329 void BrowserWindowCocoa::OnActiveTabChanged(content::WebContents* old_contents, 329 void BrowserWindowCocoa::OnActiveTabChanged(content::WebContents* old_contents,
330 content::WebContents* new_contents, 330 content::WebContents* new_contents,
331 int index, 331 int index,
332 int reason) { 332 int reason) {
333 [controller_ onActiveTabChanged:old_contents to:new_contents];
333 // TODO(pkasting): Perhaps the code in 334 // TODO(pkasting): Perhaps the code in
334 // TabStripController::activateTabWithContents should move here? Or this 335 // TabStripController::activateTabWithContents should move here? Or this
335 // should call that (instead of TabStripModelObserverBridge doing so)? It's 336 // should call that (instead of TabStripModelObserverBridge doing so)? It's
336 // not obvious to me why Mac doesn't handle tab changes in BrowserWindow the 337 // not obvious to me why Mac doesn't handle tab changes in BrowserWindow the
337 // way views and GTK do. 338 // way views and GTK do.
339 // See http://crbug.com/340720 for discussion.
338 } 340 }
339 341
340 void BrowserWindowCocoa::ZoomChangedForActiveTab(bool can_show_bubble) { 342 void BrowserWindowCocoa::ZoomChangedForActiveTab(bool can_show_bubble) {
341 [controller_ zoomChangedForActiveTab:can_show_bubble ? YES : NO]; 343 [controller_ zoomChangedForActiveTab:can_show_bubble ? YES : NO];
342 } 344 }
343 345
344 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { 346 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const {
345 // Flip coordinates based on the primary screen. 347 // Flip coordinates based on the primary screen.
346 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; 348 NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
347 NSRect frame = [controller_ regularWindowFrame]; 349 NSRect frame = [controller_ regularWindowFrame];
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 void BrowserWindowCocoa::UnhideDownloadShelf() { 833 void BrowserWindowCocoa::UnhideDownloadShelf() {
832 GetDownloadShelf()->Unhide(); 834 GetDownloadShelf()->Unhide();
833 } 835 }
834 836
835 void BrowserWindowCocoa::HideDownloadShelf() { 837 void BrowserWindowCocoa::HideDownloadShelf() {
836 GetDownloadShelf()->Hide(); 838 GetDownloadShelf()->Hide();
837 StatusBubble* statusBubble = GetStatusBubble(); 839 StatusBubble* statusBubble = GetStatusBubble();
838 if (statusBubble) 840 if (statusBubble)
839 statusBubble->Hide(); 841 statusBubble->Hide();
840 } 842 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698