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

Side by Side Diff: components/translate/core/browser/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_CORE_BROWSER_TRANSLATE_CLIENT_H_
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_
7
8 #include "components/translate/core/browser/language_state.h"
9
10 class TranslateClient {
blundell 2014/01/17 15:09:39 This needs a class-level comment.
droger 2014/01/17 16:14:21 Done.
11 public:
12 TranslateClient();
13 virtual ~TranslateClient();
14
15 // Gets the language state.
16 LanguageState& GetLanguageState();
17
18 protected:
19 LanguageState language_state_;
blundell 2014/01/17 15:09:39 This should just be in the subclasses I think.
droger 2014/01/17 16:14:21 Done.
20
21 private:
22 // Methods called by LanguageState.
blundell 2014/01/17 15:09:39 Why would these methods be private?
droger 2014/01/17 16:14:21 As discussed offline, it was that nobody can call
23 friend class LanguageState;
24 virtual bool IsLinkNavigation() = 0;
25 virtual void OnTranslateEnabledChanged() = 0;
26 virtual void OnIsPageTranslatedChanged() = 0;
27
28 DISALLOW_COPY_AND_ASSIGN(TranslateClient);
29 };
30
31 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698