OLD | NEW |
---|---|
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 Loading... | |
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 StartSyncCallback& 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]; |
akalin
2012/05/24 18:42:04
indent to line up :s
Roger Tawa OOO till Jul 10th
2012/05/24 19:08:33
Done in lastest patchset.
| |
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
662 AvatarMenuBubbleController* menu = | 659 AvatarMenuBubbleController* menu = |
663 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 660 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
664 anchoredAt:point]; | 661 anchoredAt:point]; |
665 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 662 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
666 [menu showWindow:nil]; | 663 [menu showWindow:nil]; |
667 } | 664 } |
668 | 665 |
669 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { | 666 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { |
670 [[controller_ avatarButtonController] showAvatarBubble]; | 667 [[controller_ avatarButtonController] showAvatarBubble]; |
671 } | 668 } |
OLD | NEW |