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

Side by Side Diff: chrome/browser/translate/translate_tab_helper.h

Issue 225263017: Move TranslateManager::IsTranslatableURL to be a client-level concept. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // TranslateClient implementation. 86 // TranslateClient implementation.
87 virtual TranslateDriver* GetTranslateDriver() OVERRIDE; 87 virtual TranslateDriver* GetTranslateDriver() OVERRIDE;
88 virtual PrefService* GetPrefs() OVERRIDE; 88 virtual PrefService* GetPrefs() OVERRIDE;
89 virtual scoped_ptr<TranslatePrefs> GetTranslatePrefs() OVERRIDE; 89 virtual scoped_ptr<TranslatePrefs> GetTranslatePrefs() OVERRIDE;
90 virtual TranslateAcceptLanguages* GetTranslateAcceptLanguages() OVERRIDE; 90 virtual TranslateAcceptLanguages* GetTranslateAcceptLanguages() OVERRIDE;
91 virtual void ShowTranslateUI(translate::TranslateStep step, 91 virtual void ShowTranslateUI(translate::TranslateStep step,
92 const std::string source_language, 92 const std::string source_language,
93 const std::string target_language, 93 const std::string target_language,
94 TranslateErrors::Type error_type, 94 TranslateErrors::Type error_type,
95 bool triggered_from_menu) OVERRIDE; 95 bool triggered_from_menu) OVERRIDE;
96 virtual bool IsTranslatableURL(const GURL& url) OVERRIDE;
96 97
97 private: 98 private:
98 explicit TranslateTabHelper(content::WebContents* web_contents); 99 explicit TranslateTabHelper(content::WebContents* web_contents);
99 friend class content::WebContentsUserData<TranslateTabHelper>; 100 friend class content::WebContentsUserData<TranslateTabHelper>;
100 101
101 // content::WebContentsObserver implementation. 102 // content::WebContentsObserver implementation.
102 virtual void NavigationEntryCommitted( 103 virtual void NavigationEntryCommitted(
103 const content::LoadCommittedDetails& load_details) OVERRIDE; 104 const content::LoadCommittedDetails& load_details) OVERRIDE;
104 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 105 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
105 virtual void DidNavigateAnyFrame( 106 virtual void DidNavigateAnyFrame(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 165
165 // Necessary for binding the callback to HandleCLDDataRequest on the blocking 166 // Necessary for binding the callback to HandleCLDDataRequest on the blocking
166 // pool and for delaying translation initialization until the page has 167 // pool and for delaying translation initialization until the page has
167 // finished loading on a reload. 168 // finished loading on a reload.
168 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_; 169 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_;
169 170
170 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper); 171 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper);
171 }; 172 };
172 173
173 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ 174 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_service_unittest.cc ('k') | chrome/browser/translate/translate_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698