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

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: Don't call ok in tests of advanced link 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 bool already_bookmarked) { 444 bool already_bookmarked) {
445 [controller_ showBookmarkBubbleForURL:url 445 [controller_ showBookmarkBubbleForURL:url
446 alreadyBookmarked:(already_bookmarked ? YES : NO)]; 446 alreadyBookmarked:(already_bookmarked ? YES : NO)];
447 } 447 }
448 448
449 void BrowserWindowCocoa::ShowChromeToMobileBubble() { 449 void BrowserWindowCocoa::ShowChromeToMobileBubble() {
450 [controller_ showChromeToMobileBubble]; 450 [controller_ showChromeToMobileBubble];
451 } 451 }
452 452
453 #if defined(ENABLE_ONE_CLICK_SIGNIN) 453 #if defined(ENABLE_ONE_CLICK_SIGNIN)
454
455 void BrowserWindowCocoa::ShowOneClickSigninBubble( 454 void BrowserWindowCocoa::ShowOneClickSigninBubble(
456 const base::Closure& learn_more_callback, 455 const base::Callback<void(bool)>& start_sync_callback) {
457 const base::Closure& advanced_callback) {
458 OneClickSigninBubbleController* bubble_controller = 456 OneClickSigninBubbleController* bubble_controller =
459 [[OneClickSigninBubbleController alloc] 457 [[OneClickSigninBubbleController alloc]
460 initWithBrowserWindowController:cocoa_controller() 458 initWithBrowserWindowController:cocoa_controller()
461 learnMoreCallback:learn_more_callback 459 start_sync_callback:start_sync_callback];
462 advancedCallback:advanced_callback];
463 [bubble_controller showWindow:nil]; 460 [bubble_controller showWindow:nil];
464 } 461 }
465 #endif 462 #endif
466 463
467 bool BrowserWindowCocoa::IsDownloadShelfVisible() const { 464 bool BrowserWindowCocoa::IsDownloadShelfVisible() const {
468 return [controller_ isDownloadShelfVisible] != NO; 465 return [controller_ isDownloadShelfVisible] != NO;
469 } 466 }
470 467
471 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() { 468 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() {
472 DownloadShelfController* shelfController = [controller_ downloadShelf]; 469 DownloadShelfController* shelfController = [controller_ downloadShelf];
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 AvatarMenuBubbleController* menu = 657 AvatarMenuBubbleController* menu =
661 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 658 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
662 anchoredAt:point]; 659 anchoredAt:point];
663 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; 660 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
664 [menu showWindow:nil]; 661 [menu showWindow:nil];
665 } 662 }
666 663
667 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { 664 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() {
668 [[controller_ avatarButtonController] showAvatarBubble]; 665 [[controller_ avatarButtonController] showAvatarBubble];
669 } 666 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698