| 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 495 void BrowserWindowCocoa::ShowTranslateBubble( |
| 496 content::WebContents* contents, | 496 content::WebContents* contents, |
| 497 translate::TranslateStep step, | 497 translate::TranslateStep step, |
| 498 translate::TranslateErrors::Type error_type) { | 498 translate::TranslateErrors::Type error_type, |
| 499 bool is_user_gesture) { |
| 499 ChromeTranslateClient* chrome_translate_client = | 500 ChromeTranslateClient* chrome_translate_client = |
| 500 ChromeTranslateClient::FromWebContents(contents); | 501 ChromeTranslateClient::FromWebContents(contents); |
| 501 translate::LanguageState& language_state = | 502 translate::LanguageState& language_state = |
| 502 chrome_translate_client->GetLanguageState(); | 503 chrome_translate_client->GetLanguageState(); |
| 503 language_state.SetTranslateEnabled(true); | 504 language_state.SetTranslateEnabled(true); |
| 504 | 505 |
| 505 [controller_ showTranslateBubbleForWebContents:contents | 506 [controller_ showTranslateBubbleForWebContents:contents |
| 506 step:step | 507 step:step |
| 507 errorType:error_type]; | 508 errorType:error_type]; |
| 508 } | 509 } |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 | 760 |
| 760 void BrowserWindowCocoa::ShowPageActionPopup( | 761 void BrowserWindowCocoa::ShowPageActionPopup( |
| 761 const extensions::Extension* extension) { | 762 const extensions::Extension* extension) { |
| 762 [cocoa_controller() activatePageAction:extension->id()]; | 763 [cocoa_controller() activatePageAction:extension->id()]; |
| 763 } | 764 } |
| 764 | 765 |
| 765 void BrowserWindowCocoa::ShowBrowserActionPopup( | 766 void BrowserWindowCocoa::ShowBrowserActionPopup( |
| 766 const extensions::Extension* extension) { | 767 const extensions::Extension* extension) { |
| 767 [cocoa_controller() activateBrowserAction:extension->id()]; | 768 [cocoa_controller() activateBrowserAction:extension->id()]; |
| 768 } | 769 } |
| OLD | NEW |