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

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

Issue 10332185: Update behavior of one-click infobar to remove modal dialog, add "undo". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compiler error Created 8 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 | Annotate | Revision Log
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 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 bool already_bookmarked) { 445 bool already_bookmarked) {
446 [controller_ showBookmarkBubbleForURL:url 446 [controller_ showBookmarkBubbleForURL:url
447 alreadyBookmarked:(already_bookmarked ? YES : NO)]; 447 alreadyBookmarked:(already_bookmarked ? YES : NO)];
448 } 448 }
449 449
450 void BrowserWindowCocoa::ShowChromeToMobileBubble() { 450 void BrowserWindowCocoa::ShowChromeToMobileBubble() {
451 [controller_ showChromeToMobileBubble]; 451 [controller_ showChromeToMobileBubble];
452 } 452 }
453 453
454 #if defined(ENABLE_ONE_CLICK_SIGNIN) 454 #if defined(ENABLE_ONE_CLICK_SIGNIN)
455
456 void BrowserWindowCocoa::ShowOneClickSigninBubble( 455 void BrowserWindowCocoa::ShowOneClickSigninBubble(
457 const base::Closure& learn_more_callback, 456 const base::Callback<void(bool)>& start_sync_callback) {
458 const base::Closure& advanced_callback) {
459 OneClickSigninBubbleController* bubble_controller = 457 OneClickSigninBubbleController* bubble_controller =
460 [[OneClickSigninBubbleController alloc] 458 [[OneClickSigninBubbleController alloc]
461 initWithBrowserWindowController:cocoa_controller() 459 initWithBrowserWindowController:cocoa_controller()
462 learnMoreCallback:learn_more_callback 460 start_sync_callback:start_sync_callback];
463 advancedCallback:advanced_callback];
464 [bubble_controller showWindow:nil]; 461 [bubble_controller showWindow:nil];
465 } 462 }
466 #endif 463 #endif
467 464
468 bool BrowserWindowCocoa::IsDownloadShelfVisible() const { 465 bool BrowserWindowCocoa::IsDownloadShelfVisible() const {
469 return [controller_ isDownloadShelfVisible] != NO; 466 return [controller_ isDownloadShelfVisible] != NO;
470 } 467 }
471 468
472 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() { 469 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() {
473 DownloadShelfController* shelfController = [controller_ downloadShelf]; 470 DownloadShelfController* shelfController = [controller_ downloadShelf];
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 AvatarMenuBubbleController* menu = 658 AvatarMenuBubbleController* menu =
662 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 659 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
663 anchoredAt:point]; 660 anchoredAt:point];
664 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; 661 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
665 [menu showWindow:nil]; 662 [menu showWindow:nil];
666 } 663 }
667 664
668 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { 665 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() {
669 [[controller_ avatarButtonController] showAvatarBubble]; 666 [[controller_ avatarButtonController] showAvatarBubble];
670 } 667 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698