| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 477 } |
| 478 | 478 |
| 479 void BrowserWindowCocoa::ShowChromeToMobileBubble() { | 479 void BrowserWindowCocoa::ShowChromeToMobileBubble() { |
| 480 [controller_ showChromeToMobileBubble]; | 480 [controller_ showChromeToMobileBubble]; |
| 481 } | 481 } |
| 482 | 482 |
| 483 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 483 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 484 void BrowserWindowCocoa::ShowOneClickSigninBubble( | 484 void BrowserWindowCocoa::ShowOneClickSigninBubble( |
| 485 OneClickSigninBubbleType type, | 485 OneClickSigninBubbleType type, |
| 486 const string16& email, | 486 const string16& email, |
| 487 const string16& error_message, |
| 487 const StartSyncCallback& start_sync_callback) { | 488 const StartSyncCallback& start_sync_callback) { |
| 488 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { | 489 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { |
| 489 scoped_nsobject<OneClickSigninBubbleController> bubble_controller( | 490 scoped_nsobject<OneClickSigninBubbleController> bubble_controller( |
| 490 [[OneClickSigninBubbleController alloc] | 491 [[OneClickSigninBubbleController alloc] |
| 491 initWithBrowserWindowController:cocoa_controller() | 492 initWithBrowserWindowController:cocoa_controller() |
| 492 callback:start_sync_callback]); | 493 callback:start_sync_callback]); |
| 493 [bubble_controller showWindow:nil]; | 494 [bubble_controller showWindow:nil]; |
| 494 } else { | 495 } else { |
| 495 WebContents* web_contents = | 496 WebContents* web_contents = |
| 496 browser_->tab_strip_model()->GetActiveWebContents(); | 497 browser_->tab_strip_model()->GetActiveWebContents(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 PasswordGenerationBubbleController* controller = | 706 PasswordGenerationBubbleController* controller = |
| 706 [[PasswordGenerationBubbleController alloc] | 707 [[PasswordGenerationBubbleController alloc] |
| 707 initWithWindow:browser_->window()->GetNativeWindow() | 708 initWithWindow:browser_->window()->GetNativeWindow() |
| 708 anchoredAt:point | 709 anchoredAt:point |
| 709 renderViewHost:web_contents->GetRenderViewHost() | 710 renderViewHost:web_contents->GetRenderViewHost() |
| 710 passwordManager:PasswordManager::FromWebContents(web_contents) | 711 passwordManager:PasswordManager::FromWebContents(web_contents) |
| 711 usingGenerator:password_generator | 712 usingGenerator:password_generator |
| 712 forForm:form]; | 713 forForm:form]; |
| 713 [controller showWindow:nil]; | 714 [controller showWindow:nil]; |
| 714 } | 715 } |
| OLD | NEW |