OLD | NEW |
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_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" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 TabContents* ExtensionDOMUI::associated_tab_contents() const { | 198 TabContents* ExtensionDOMUI::associated_tab_contents() const { |
199 return tab_contents(); | 199 return tab_contents(); |
200 } | 200 } |
201 | 201 |
202 ExtensionBookmarkManagerEventRouter* | 202 ExtensionBookmarkManagerEventRouter* |
203 ExtensionDOMUI::extension_bookmark_manager_event_router() { | 203 ExtensionDOMUI::extension_bookmark_manager_event_router() { |
204 return extension_bookmark_manager_event_router_.get(); | 204 return extension_bookmark_manager_event_router_.get(); |
205 } | 205 } |
206 | 206 |
207 gfx::NativeWindow ExtensionDOMUI::GetCustomFrameNativeWindow() { | |
208 if (GetBrowser()) | |
209 return NULL; | |
210 | |
211 // If there was no browser associated with the function dispatcher delegate, | |
212 // then this DOMUI may be hosted in an ExternalTabContainer, and a framing | |
213 // window will be accessible through the tab_contents. | |
214 TabContentsDelegate* tab_contents_delegate = tab_contents()->delegate(); | |
215 if (tab_contents_delegate) | |
216 return tab_contents_delegate->GetFrameNativeWindow(); | |
217 else | |
218 return NULL; | |
219 } | |
220 | |
221 gfx::NativeView ExtensionDOMUI::GetNativeViewOfHost() { | 207 gfx::NativeView ExtensionDOMUI::GetNativeViewOfHost() { |
222 return tab_contents()->GetRenderWidgetHostView()->GetNativeView(); | 208 return tab_contents()->GetRenderWidgetHostView()->GetNativeView(); |
223 } | 209 } |
224 | 210 |
225 //////////////////////////////////////////////////////////////////////////////// | 211 //////////////////////////////////////////////////////////////////////////////// |
226 // chrome:// URL overrides | 212 // chrome:// URL overrides |
227 | 213 |
228 // static | 214 // static |
229 void ExtensionDOMUI::RegisterUserPrefs(PrefService* prefs) { | 215 void ExtensionDOMUI::RegisterUserPrefs(PrefService* prefs) { |
230 prefs->RegisterDictionaryPref(kExtensionURLOverrides); | 216 prefs->RegisterDictionaryPref(kExtensionURLOverrides); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 386 } |
401 | 387 |
402 // static | 388 // static |
403 void ExtensionDOMUI::GetFaviconForURL(Profile* profile, | 389 void ExtensionDOMUI::GetFaviconForURL(Profile* profile, |
404 FaviconService::GetFaviconRequest* request, const GURL& page_url) { | 390 FaviconService::GetFaviconRequest* request, const GURL& page_url) { |
405 // tracker deletes itself when done. | 391 // tracker deletes itself when done. |
406 ExtensionDOMUIImageLoadingTracker* tracker = | 392 ExtensionDOMUIImageLoadingTracker* tracker = |
407 new ExtensionDOMUIImageLoadingTracker(profile, request, page_url); | 393 new ExtensionDOMUIImageLoadingTracker(profile, request, page_url); |
408 tracker->Init(); | 394 tracker->Init(); |
409 } | 395 } |
OLD | NEW |