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 virtual ~BrowserContentTranslateDriverObserver(); 24 25 // Overridden from ContentTranslateDriver::Observer 26 virtual void OnIsPageTranslatedChanged(content::WebContents* source) OVERRIDE; 27 virtual 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_ 36