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

Side by Side Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 6735004: Move extension messages to their own file and add a RenderViewObserver to start moving the extens... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/extensions/extension_web_ui.h" 5 #include "chrome/browser/extensions/extension_web_ui.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "net/base/file_stream.h" 10 #include "net/base/file_stream.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ResetExtensionFunctionDispatcher(render_view_host); 176 ResetExtensionFunctionDispatcher(render_view_host);
177 ResetExtensionBookmarkManagerEventRouter(); 177 ResetExtensionBookmarkManagerEventRouter();
178 } 178 }
179 179
180 void ExtensionWebUI::RenderViewReused(RenderViewHost* render_view_host) { 180 void ExtensionWebUI::RenderViewReused(RenderViewHost* render_view_host) {
181 ResetExtensionFunctionDispatcher(render_view_host); 181 ResetExtensionFunctionDispatcher(render_view_host);
182 ResetExtensionBookmarkManagerEventRouter(); 182 ResetExtensionBookmarkManagerEventRouter();
183 } 183 }
184 184
185 void ExtensionWebUI::ProcessWebUIMessage( 185 void ExtensionWebUI::ProcessWebUIMessage(
186 const ViewHostMsg_DomMessage_Params& params) { 186 const ExtensionHostMsg_DomMessage_Params& params) {
187 extension_function_dispatcher_->HandleRequest(params); 187 extension_function_dispatcher_->HandleRequest(params);
188 } 188 }
189 189
190 Browser* ExtensionWebUI::GetBrowser() { 190 Browser* ExtensionWebUI::GetBrowser() {
191 TabContents* contents = tab_contents(); 191 TabContents* contents = tab_contents();
192 TabContentsIterator tab_iterator; 192 TabContentsIterator tab_iterator;
193 for (; !tab_iterator.done(); ++tab_iterator) { 193 for (; !tab_iterator.done(); ++tab_iterator) {
194 if (contents == *tab_iterator) 194 if (contents == *tab_iterator)
195 return tab_iterator.browser(); 195 return tab_iterator.browser();
196 } 196 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 405
406 // static 406 // static
407 void ExtensionWebUI::GetFaviconForURL(Profile* profile, 407 void ExtensionWebUI::GetFaviconForURL(Profile* profile,
408 FaviconService::GetFaviconRequest* request, const GURL& page_url) { 408 FaviconService::GetFaviconRequest* request, const GURL& page_url) {
409 // tracker deletes itself when done. 409 // tracker deletes itself when done.
410 ExtensionWebUIImageLoadingTracker* tracker = 410 ExtensionWebUIImageLoadingTracker* tracker =
411 new ExtensionWebUIImageLoadingTracker(profile, request, page_url); 411 new ExtensionWebUIImageLoadingTracker(profile, request, page_url);
412 tracker->Init(); 412 tracker->Init();
413 } 413 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.h ('k') | chrome/browser/extensions/user_script_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698