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

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

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 explicit TranslateTabHelper(content::WebContents* web_contents); 101 explicit TranslateTabHelper(content::WebContents* web_contents);
102 friend class content::WebContentsUserData<TranslateTabHelper>; 102 friend class content::WebContentsUserData<TranslateTabHelper>;
103 103
104 // content::WebContentsObserver implementation. 104 // content::WebContentsObserver implementation.
105 virtual void NavigationEntryCommitted( 105 virtual void NavigationEntryCommitted(
106 const content::LoadCommittedDetails& load_details) OVERRIDE; 106 const content::LoadCommittedDetails& load_details) OVERRIDE;
107 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 107 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
108 virtual void DidNavigateAnyFrame( 108 virtual void DidNavigateAnyFrame(
109 const content::LoadCommittedDetails& details, 109 const content::LoadCommittedDetails& details,
110 const content::FrameNavigateParams& params) OVERRIDE; 110 const content::FrameNavigateParams& params) OVERRIDE;
111 virtual void WebContentsDestroyed( 111 virtual void WebContentsDestroyed() OVERRIDE;
112 content::WebContents* web_contents) OVERRIDE;
113 112
114 // Initiates translation once the page is finished loading. 113 // Initiates translation once the page is finished loading.
115 void InitiateTranslation(const std::string& page_lang, int attempt); 114 void InitiateTranslation(const std::string& page_lang, int attempt);
116 void OnLanguageDetermined(const LanguageDetectionDetails& details, 115 void OnLanguageDetermined(const LanguageDetectionDetails& details,
117 bool page_needs_translation); 116 bool page_needs_translation);
118 void OnPageTranslated(int32 page_id, 117 void OnPageTranslated(int32 page_id,
119 const std::string& original_lang, 118 const std::string& original_lang,
120 const std::string& translated_lang, 119 const std::string& translated_lang,
121 TranslateErrors::Type error_type); 120 TranslateErrors::Type error_type);
122 121
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 166
168 // Necessary for binding the callback to HandleCLDDataRequest on the blocking 167 // Necessary for binding the callback to HandleCLDDataRequest on the blocking
169 // pool and for delaying translation initialization until the page has 168 // pool and for delaying translation initialization until the page has
170 // finished loading on a reload. 169 // finished loading on a reload.
171 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_; 170 base::WeakPtrFactory<TranslateTabHelper> weak_pointer_factory_;
172 171
173 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper); 172 DISALLOW_COPY_AND_ASSIGN(TranslateTabHelper);
174 }; 173 };
175 174
176 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_ 175 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/web_contents_resource_provider.cc ('k') | chrome/browser/translate/translate_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698