| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 ChromeTranslateClient::FromWebContents(contents); | 496 ChromeTranslateClient::FromWebContents(contents); |
| 497 translate::LanguageState& language_state = | 497 translate::LanguageState& language_state = |
| 498 chrome_translate_client->GetLanguageState(); | 498 chrome_translate_client->GetLanguageState(); |
| 499 language_state.SetTranslateEnabled(true); | 499 language_state.SetTranslateEnabled(true); |
| 500 | 500 |
| 501 [controller_ showTranslateBubbleForWebContents:contents | 501 [controller_ showTranslateBubbleForWebContents:contents |
| 502 step:step | 502 step:step |
| 503 errorType:error_type]; | 503 errorType:error_type]; |
| 504 } | 504 } |
| 505 | 505 |
| 506 void BrowserWindowCocoa::CloseTranslateBubble() { |
| 507 } |
| 508 |
| 506 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 509 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 507 void BrowserWindowCocoa::ShowOneClickSigninBubble( | 510 void BrowserWindowCocoa::ShowOneClickSigninBubble( |
| 508 OneClickSigninBubbleType type, | 511 OneClickSigninBubbleType type, |
| 509 const base::string16& email, | 512 const base::string16& email, |
| 510 const base::string16& error_message, | 513 const base::string16& error_message, |
| 511 const StartSyncCallback& start_sync_callback) { | 514 const StartSyncCallback& start_sync_callback) { |
| 512 WebContents* web_contents = | 515 WebContents* web_contents = |
| 513 browser_->tab_strip_model()->GetActiveWebContents(); | 516 browser_->tab_strip_model()->GetActiveWebContents(); |
| 514 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { | 517 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { |
| 515 base::scoped_nsobject<OneClickSigninBubbleController> bubble_controller([ | 518 base::scoped_nsobject<OneClickSigninBubbleController> bubble_controller([ |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) | 713 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) |
| 711 return 0; | 714 return 0; |
| 712 return 40; | 715 return 40; |
| 713 } | 716 } |
| 714 | 717 |
| 715 void BrowserWindowCocoa::ExecuteExtensionCommand( | 718 void BrowserWindowCocoa::ExecuteExtensionCommand( |
| 716 const extensions::Extension* extension, | 719 const extensions::Extension* extension, |
| 717 const extensions::Command& command) { | 720 const extensions::Command& command) { |
| 718 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; | 721 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; |
| 719 } | 722 } |
| OLD | NEW |