| OLD | NEW |
| 1 // Copyright (c) 2010 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_dom_ui.h" | 5 #include "chrome/browser/extensions/extension_dom_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" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 void ExtensionDOMUI::RenderViewReused(RenderViewHost* render_view_host) { | 177 void ExtensionDOMUI::RenderViewReused(RenderViewHost* render_view_host) { |
| 178 ResetExtensionFunctionDispatcher(render_view_host); | 178 ResetExtensionFunctionDispatcher(render_view_host); |
| 179 ResetExtensionBookmarkManagerEventRouter(); | 179 ResetExtensionBookmarkManagerEventRouter(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ExtensionDOMUI::ProcessDOMUIMessage( | 182 void ExtensionDOMUI::ProcessDOMUIMessage( |
| 183 const ViewHostMsg_DomMessage_Params& params) { | 183 const ViewHostMsg_DomMessage_Params& params) { |
| 184 extension_function_dispatcher_->HandleRequest(params); | 184 extension_function_dispatcher_->HandleRequest(params); |
| 185 } | 185 } |
| 186 | 186 |
| 187 Browser* ExtensionDOMUI::GetBrowser() const { | 187 Browser* ExtensionDOMUI::GetBrowser() { |
| 188 TabContents* contents = tab_contents(); | 188 TabContents* contents = tab_contents(); |
| 189 TabContentsIterator tab_iterator; | 189 TabContentsIterator tab_iterator; |
| 190 for (; !tab_iterator.done(); ++tab_iterator) { | 190 for (; !tab_iterator.done(); ++tab_iterator) { |
| 191 if (contents == *tab_iterator) | 191 if (contents == *tab_iterator) |
| 192 return tab_iterator.browser(); | 192 return tab_iterator.browser(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 return NULL; | 195 return NULL; |
| 196 } | 196 } |
| 197 | 197 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 400 } |
| 401 | 401 |
| 402 // static | 402 // static |
| 403 void ExtensionDOMUI::GetFaviconForURL(Profile* profile, | 403 void ExtensionDOMUI::GetFaviconForURL(Profile* profile, |
| 404 FaviconService::GetFaviconRequest* request, const GURL& page_url) { | 404 FaviconService::GetFaviconRequest* request, const GURL& page_url) { |
| 405 // tracker deletes itself when done. | 405 // tracker deletes itself when done. |
| 406 ExtensionDOMUIImageLoadingTracker* tracker = | 406 ExtensionDOMUIImageLoadingTracker* tracker = |
| 407 new ExtensionDOMUIImageLoadingTracker(profile, request, page_url); | 407 new ExtensionDOMUIImageLoadingTracker(profile, request, page_url); |
| 408 tracker->Init(); | 408 tracker->Init(); |
| 409 } | 409 } |
| OLD | NEW |