OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 | 226 |
227 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() { | 227 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() { |
228 return this; | 228 return this; |
229 } | 229 } |
230 | 230 |
231 void ExtensionHost::CreateNewWindow(int route_id, | 231 void ExtensionHost::CreateNewWindow(int route_id, |
232 base::WaitableEvent* modal_dialog_event) { | 232 base::WaitableEvent* modal_dialog_event) { |
233 delegate_view_helper_.CreateNewWindow( | 233 delegate_view_helper_.CreateNewWindow( |
234 route_id, modal_dialog_event, render_view_host()->process()->profile(), | 234 route_id, modal_dialog_event, render_view_host()->process()->profile(), |
235 site_instance()); | 235 site_instance(), DOMUIFactory::GetDOMUIType(url_)); |
236 } | 236 } |
237 | 237 |
238 void ExtensionHost::CreateNewWidget(int route_id, bool activatable) { | 238 void ExtensionHost::CreateNewWidget(int route_id, bool activatable) { |
239 delegate_view_helper_.CreateNewWidget(route_id, activatable, | 239 delegate_view_helper_.CreateNewWidget(route_id, activatable, |
240 site_instance()->GetProcess()); | 240 site_instance()->GetProcess()); |
241 } | 241 } |
242 | 242 |
243 void ExtensionHost::ShowCreatedWindow(int route_id, | 243 void ExtensionHost::ShowCreatedWindow(int route_id, |
244 WindowOpenDisposition disposition, | 244 WindowOpenDisposition disposition, |
245 const gfx::Rect& initial_pos, | 245 const gfx::Rect& initial_pos, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 window_id = ExtensionTabUtil::GetWindowId( | 349 window_id = ExtensionTabUtil::GetWindowId( |
350 const_cast<ExtensionHost* >(this)->GetBrowser()); | 350 const_cast<ExtensionHost* >(this)->GetBrowser()); |
351 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { | 351 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { |
352 // Background page is not attached to any browser window, so pass -1. | 352 // Background page is not attached to any browser window, so pass -1. |
353 window_id = -1; | 353 window_id = -1; |
354 } else { | 354 } else { |
355 NOTREACHED(); | 355 NOTREACHED(); |
356 } | 356 } |
357 return window_id; | 357 return window_id; |
358 } | 358 } |
OLD | NEW |