OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 8 |
9 #include "net/base/file_stream.h" | 9 #include "net/base/file_stream.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 Browser* ExtensionDOMUI::GetBrowser() const { | 187 Browser* ExtensionDOMUI::GetBrowser() const { |
188 // TODO(beng): This is an improper direct dependency on Browser. Route this | 188 // TODO(beng): This is an improper direct dependency on Browser. Route this |
189 // through some sort of delegate. | 189 // through some sort of delegate. |
190 return BrowserList::FindBrowserWithProfile(DOMUI::GetProfile()); | 190 return BrowserList::FindBrowserWithProfile(DOMUI::GetProfile()); |
191 } | 191 } |
192 | 192 |
193 TabContents* ExtensionDOMUI::associated_tab_contents() const { | 193 TabContents* ExtensionDOMUI::associated_tab_contents() const { |
194 return tab_contents(); | 194 return tab_contents(); |
195 } | 195 } |
196 | 196 |
197 Profile* ExtensionDOMUI::GetProfile() { | |
198 return DOMUI::GetProfile(); | |
199 } | |
200 | |
201 ExtensionBookmarkManagerEventRouter* | 197 ExtensionBookmarkManagerEventRouter* |
202 ExtensionDOMUI::extension_bookmark_manager_event_router() { | 198 ExtensionDOMUI::extension_bookmark_manager_event_router() { |
203 return extension_bookmark_manager_event_router_.get(); | 199 return extension_bookmark_manager_event_router_.get(); |
204 } | 200 } |
205 | 201 |
206 gfx::NativeWindow ExtensionDOMUI::GetCustomFrameNativeWindow() { | 202 gfx::NativeWindow ExtensionDOMUI::GetCustomFrameNativeWindow() { |
207 if (GetBrowser()) | 203 if (GetBrowser()) |
208 return NULL; | 204 return NULL; |
209 | 205 |
210 // If there was no browser associated with the function dispatcher delegate, | 206 // If there was no browser associated with the function dispatcher delegate, |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 402 } |
407 | 403 |
408 // static | 404 // static |
409 void ExtensionDOMUI::GetFaviconForURL(Profile* profile, | 405 void ExtensionDOMUI::GetFaviconForURL(Profile* profile, |
410 FaviconService::GetFaviconRequest* request, const GURL& page_url) { | 406 FaviconService::GetFaviconRequest* request, const GURL& page_url) { |
411 // tracker deletes itself when done. | 407 // tracker deletes itself when done. |
412 ExtensionDOMUIImageLoadingTracker* tracker = | 408 ExtensionDOMUIImageLoadingTracker* tracker = |
413 new ExtensionDOMUIImageLoadingTracker(profile, request, page_url); | 409 new ExtensionDOMUIImageLoadingTracker(profile, request, page_url); |
414 tracker->Init(); | 410 tracker->Init(); |
415 } | 411 } |
OLD | NEW |