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

Side by Side Diff: chrome/browser/ui/browser_content_translate_driver_observer.h

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_
6 #define CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_
7
8 #include "components/translate/content/browser/content_translate_driver.h"
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12
13 class Browser;
14
15 // Implementation of ContentTranslateDriver::Observer for Browser. This observes
16 // wether Translate is enabled or not, and updates toolbar in response to
17 // changes in state of translate.
18 class BrowserContentTranslateDriverObserver
19 : public translate::ContentTranslateDriver::Observer {
20 public:
21 explicit BrowserContentTranslateDriverObserver(Browser* browser);
22
23 ~BrowserContentTranslateDriverObserver() override;
24
25 // Overridden from ContentTranslateDriver::Observer
26 void OnIsPageTranslatedChanged(content::WebContents* source) override;
27 void OnTranslateEnabledChanged(content::WebContents* source) override;
28
29 private:
30 Browser* browser_;
31
32 DISALLOW_COPY_AND_ASSIGN(BrowserContentTranslateDriverObserver);
33 };
34
35 #endif // CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_content_translate_driver_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698