| 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 [controller_ showBookmarkBubbleForURL:url | 470 [controller_ showBookmarkBubbleForURL:url |
| 471 alreadyBookmarked:(already_bookmarked ? YES : NO)]; | 471 alreadyBookmarked:(already_bookmarked ? YES : NO)]; |
| 472 } | 472 } |
| 473 | 473 |
| 474 void BrowserWindowCocoa::ShowChromeToMobileBubble() { | 474 void BrowserWindowCocoa::ShowChromeToMobileBubble() { |
| 475 [controller_ showChromeToMobileBubble]; | 475 [controller_ showChromeToMobileBubble]; |
| 476 } | 476 } |
| 477 | 477 |
| 478 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 478 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 479 void BrowserWindowCocoa::ShowOneClickSigninBubble( | 479 void BrowserWindowCocoa::ShowOneClickSigninBubble( |
| 480 const StartSyncCallback& start_sync_callback) { | 480 OneClickSigninBubbleType type, |
| 481 const StartSyncCallback& start_sync_callback) { |
| 481 OneClickSigninBubbleController* bubble_controller = | 482 OneClickSigninBubbleController* bubble_controller = |
| 482 [[OneClickSigninBubbleController alloc] | 483 [[OneClickSigninBubbleController alloc] |
| 483 initWithBrowserWindowController:cocoa_controller() | 484 initWithBrowserWindowController:cocoa_controller() |
| 484 start_sync_callback:start_sync_callback]; | 485 start_sync_callback:start_sync_callback]; |
| 485 [bubble_controller showWindow:nil]; | 486 [bubble_controller showWindow:nil]; |
| 486 } | 487 } |
| 487 #endif | 488 #endif |
| 488 | 489 |
| 489 bool BrowserWindowCocoa::IsDownloadShelfVisible() const { | 490 bool BrowserWindowCocoa::IsDownloadShelfVisible() const { |
| 490 return [controller_ isDownloadShelfVisible] != NO; | 491 return [controller_ isDownloadShelfVisible] != NO; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 PasswordGenerationBubbleController* controller = | 699 PasswordGenerationBubbleController* controller = |
| 699 [[PasswordGenerationBubbleController alloc] | 700 [[PasswordGenerationBubbleController alloc] |
| 700 initWithWindow:browser_->window()->GetNativeWindow() | 701 initWithWindow:browser_->window()->GetNativeWindow() |
| 701 anchoredAt:point | 702 anchoredAt:point |
| 702 renderViewHost:web_contents->GetRenderViewHost() | 703 renderViewHost:web_contents->GetRenderViewHost() |
| 703 passwordManager:PasswordManager::FromWebContents(web_contents) | 704 passwordManager:PasswordManager::FromWebContents(web_contents) |
| 704 usingGenerator:password_generator | 705 usingGenerator:password_generator |
| 705 forForm:form]; | 706 forForm:form]; |
| 706 [controller showWindow:nil]; | 707 [controller showWindow:nil]; |
| 707 } | 708 } |
| OLD | NEW |