Chromium Code Reviews| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 } | 473 } |
| 474 | 474 |
| 475 void BrowserWindowCocoa::ShowChromeToMobileBubble() { | 475 void BrowserWindowCocoa::ShowChromeToMobileBubble() { |
| 476 [controller_ showChromeToMobileBubble]; | 476 [controller_ showChromeToMobileBubble]; |
| 477 } | 477 } |
| 478 | 478 |
| 479 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 479 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 480 void BrowserWindowCocoa::ShowOneClickSigninBubble( | 480 void BrowserWindowCocoa::ShowOneClickSigninBubble( |
| 481 OneClickSigninBubbleType type, | 481 OneClickSigninBubbleType type, |
| 482 const string16& email, | 482 const string16& email, |
| 483 const StartSyncCallback& start_sync_callback) { | 483 const StartSyncCallback& start_sync_callback, |
| 484 const std::string& error_message | |
| 485 ) { | |
|
bcwhite
2013/04/16 15:22:00
Move up on previous line.
noms (inactive)
2013/04/16 17:15:37
Done.
| |
| 484 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { | 486 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { |
| 485 scoped_nsobject<OneClickSigninBubbleController> bubble_controller( | 487 scoped_nsobject<OneClickSigninBubbleController> bubble_controller( |
| 486 [[OneClickSigninBubbleController alloc] | 488 [[OneClickSigninBubbleController alloc] |
| 487 initWithBrowserWindowController:cocoa_controller() | 489 initWithBrowserWindowController:cocoa_controller() |
| 488 callback:start_sync_callback]); | 490 callback:start_sync_callback]); |
| 489 [bubble_controller showWindow:nil]; | 491 [bubble_controller showWindow:nil]; |
| 490 } else { | 492 } else { |
| 491 WebContents* web_contents = | 493 WebContents* web_contents = |
| 492 browser_->tab_strip_model()->GetActiveWebContents(); | 494 browser_->tab_strip_model()->GetActiveWebContents(); |
| 493 // Deletes itself when the dialog closes. | 495 // Deletes itself when the dialog closes. |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 701 PasswordGenerationBubbleController* controller = | 703 PasswordGenerationBubbleController* controller = |
| 702 [[PasswordGenerationBubbleController alloc] | 704 [[PasswordGenerationBubbleController alloc] |
| 703 initWithWindow:browser_->window()->GetNativeWindow() | 705 initWithWindow:browser_->window()->GetNativeWindow() |
| 704 anchoredAt:point | 706 anchoredAt:point |
| 705 renderViewHost:web_contents->GetRenderViewHost() | 707 renderViewHost:web_contents->GetRenderViewHost() |
| 706 passwordManager:PasswordManager::FromWebContents(web_contents) | 708 passwordManager:PasswordManager::FromWebContents(web_contents) |
| 707 usingGenerator:password_generator | 709 usingGenerator:password_generator |
| 708 forForm:form]; | 710 forForm:form]; |
| 709 [controller showWindow:nil]; | 711 [controller showWindow:nil]; |
| 710 } | 712 } |
| OLD | NEW |