| 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 [controller_ showBookmarkBubbleForURL:url | 485 [controller_ showBookmarkBubbleForURL:url |
| 486 alreadyBookmarked:(already_bookmarked ? YES : NO)]; | 486 alreadyBookmarked:(already_bookmarked ? YES : NO)]; |
| 487 } | 487 } |
| 488 | 488 |
| 489 void BrowserWindowCocoa::ShowBookmarkAppBubble( | 489 void BrowserWindowCocoa::ShowBookmarkAppBubble( |
| 490 const WebApplicationInfo& web_app_info, | 490 const WebApplicationInfo& web_app_info, |
| 491 const std::string& extension_id) { | 491 const std::string& extension_id) { |
| 492 NOTIMPLEMENTED(); | 492 NOTIMPLEMENTED(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 void BrowserWindowCocoa::ShowTranslateBubble(content::WebContents* contents, | 495 void BrowserWindowCocoa::ShowTranslateBubble( |
| 496 translate::TranslateStep step, | 496 content::WebContents* contents, |
| 497 TranslateErrors::Type error_type) { | 497 translate::TranslateStep step, |
| 498 translate::TranslateErrors::Type error_type) { |
| 498 ChromeTranslateClient* chrome_translate_client = | 499 ChromeTranslateClient* chrome_translate_client = |
| 499 ChromeTranslateClient::FromWebContents(contents); | 500 ChromeTranslateClient::FromWebContents(contents); |
| 500 LanguageState& language_state = chrome_translate_client->GetLanguageState(); | 501 translate::LanguageState& language_state = |
| 502 chrome_translate_client->GetLanguageState(); |
| 501 language_state.SetTranslateEnabled(true); | 503 language_state.SetTranslateEnabled(true); |
| 502 | 504 |
| 503 [controller_ showTranslateBubbleForWebContents:contents | 505 [controller_ showTranslateBubbleForWebContents:contents |
| 504 step:step | 506 step:step |
| 505 errorType:error_type]; | 507 errorType:error_type]; |
| 506 } | 508 } |
| 507 | 509 |
| 508 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 510 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 509 void BrowserWindowCocoa::ShowOneClickSigninBubble( | 511 void BrowserWindowCocoa::ShowOneClickSigninBubble( |
| 510 OneClickSigninBubbleType type, | 512 OneClickSigninBubbleType type, |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 | 757 |
| 756 void BrowserWindowCocoa::ShowPageActionPopup( | 758 void BrowserWindowCocoa::ShowPageActionPopup( |
| 757 const extensions::Extension* extension) { | 759 const extensions::Extension* extension) { |
| 758 [cocoa_controller() activatePageAction:extension->id()]; | 760 [cocoa_controller() activatePageAction:extension->id()]; |
| 759 } | 761 } |
| 760 | 762 |
| 761 void BrowserWindowCocoa::ShowBrowserActionPopup( | 763 void BrowserWindowCocoa::ShowBrowserActionPopup( |
| 762 const extensions::Extension* extension) { | 764 const extensions::Extension* extension) { |
| 763 [cocoa_controller() activateBrowserAction:extension->id()]; | 765 [cocoa_controller() activateBrowserAction:extension->id()]; |
| 764 } | 766 } |
| OLD | NEW |