Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7290)

Unified Diff: chrome/browser/ui/browser_content_translate_driver_observer.cc

Issue 949653003: When page translation state is updated, just ask the toolbar to update, don't (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_content_translate_driver_observer.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_content_translate_driver_observer.cc
diff --git a/chrome/browser/ui/browser_content_translate_driver_observer.cc b/chrome/browser/ui/browser_content_translate_driver_observer.cc
deleted file mode 100644
index 06ff312ce6c681d2b7695754d120d89e21fcc575..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/browser_content_translate_driver_observer.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/browser_content_translate_driver_observer.h"
-
-#include "chrome/browser/translate/chrome_translate_client.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/tabs/tab_strip_model.h"
-#include "components/translate/core/browser/language_state.h"
-
-BrowserContentTranslateDriverObserver::BrowserContentTranslateDriverObserver(
- Browser* browser) : browser_(browser) {
-}
-
-BrowserContentTranslateDriverObserver::
- ~BrowserContentTranslateDriverObserver() {
-}
-
-void BrowserContentTranslateDriverObserver::OnIsPageTranslatedChanged(
- content::WebContents* source) {
- if (source == browser_->tab_strip_model()->GetActiveWebContents()) {
- ChromeTranslateClient* chrome_translate_client =
- ChromeTranslateClient::FromWebContents(source);
- translate::LanguageState& language_state =
- chrome_translate_client->GetLanguageState();
- browser_->window()->SetTranslateIconToggled(
- language_state.IsPageTranslated());
- }
-}
-
-void BrowserContentTranslateDriverObserver::OnTranslateEnabledChanged(
- content::WebContents* source) {
- if (source == browser_->tab_strip_model()->GetActiveWebContents())
- browser_->window()->UpdateToolbar(source);
-}
« no previous file with comments | « chrome/browser/ui/browser_content_translate_driver_observer.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698