| 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 string16& error_message, |
| 483 const StartSyncCallback& start_sync_callback) { | 484 const StartSyncCallback& start_sync_callback) { |
| 484 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { | 485 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { |
| 485 scoped_nsobject<OneClickSigninBubbleController> bubble_controller( | 486 scoped_nsobject<OneClickSigninBubbleController> bubble_controller( |
| 486 [[OneClickSigninBubbleController alloc] | 487 [[OneClickSigninBubbleController alloc] |
| 487 initWithBrowserWindowController:cocoa_controller() | 488 initWithBrowserWindowController:cocoa_controller() |
| 488 callback:start_sync_callback]); | 489 callback:start_sync_callback]); |
| 489 [bubble_controller showWindow:nil]; | 490 [bubble_controller showWindow:nil]; |
| 490 } else { | 491 } else { |
| 491 WebContents* web_contents = | 492 WebContents* web_contents = |
| 492 browser_->tab_strip_model()->GetActiveWebContents(); | 493 browser_->tab_strip_model()->GetActiveWebContents(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 PasswordGenerationBubbleController* controller = | 702 PasswordGenerationBubbleController* controller = |
| 702 [[PasswordGenerationBubbleController alloc] | 703 [[PasswordGenerationBubbleController alloc] |
| 703 initWithWindow:browser_->window()->GetNativeWindow() | 704 initWithWindow:browser_->window()->GetNativeWindow() |
| 704 anchoredAt:point | 705 anchoredAt:point |
| 705 renderViewHost:web_contents->GetRenderViewHost() | 706 renderViewHost:web_contents->GetRenderViewHost() |
| 706 passwordManager:PasswordManager::FromWebContents(web_contents) | 707 passwordManager:PasswordManager::FromWebContents(web_contents) |
| 707 usingGenerator:password_generator | 708 usingGenerator:password_generator |
| 708 forForm:form]; | 709 forForm:form]; |
| 709 [controller showWindow:nil]; | 710 [controller showWindow:nil]; |
| 710 } | 711 } |
| OLD | NEW |