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

Side by Side Diff: components/translate/content/browser/content_translate_client.h

Issue 133273029: Move LanguageState to the translate component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 11 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 COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_CLIENT_H_
6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_CLIENT_H_
7
8 #include "components/translate/core/browser/translate_client.h"
9
10 namespace content {
11 struct LoadCommittedDetails;
12 class NavigationController;
13 }
14
15 class LanguageStateObserver;
16
17 // Content implementation of TranslateClient.
18 class ContentTranslateClient : public TranslateClient {
19 public:
20
21 ContentTranslateClient(content::NavigationController* nav_controller);
22 virtual ~ContentTranslateClient();
23
24 // Sets the LanguageStateObserver. Calling this method is optional.
25 void SetLanguageStateObserver(LanguageStateObserver* observer);
26
27 // Must be called on navigations.
28 void DidNavigate(const content::LoadCommittedDetails& details);
29
30 private:
31 // TranslateClient methods
32 virtual void OnIsPageTranslatedChanged() OVERRIDE;
33 virtual void OnTranslateEnabledChanged() OVERRIDE;
34 virtual bool IsLinkNavigation() OVERRIDE;
35
36 // The navigation controller of the tab we are associated with.
37 content::NavigationController* navigation_controller_;
38
39 LanguageStateObserver* language_state_observer_;
40
41 DISALLOW_COPY_AND_ASSIGN(ContentTranslateClient);
42 };
43
44 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698