| 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/tab_contents/background_contents.h" | 5 #include "chrome/browser/tab_contents/background_contents.h" |
| 6 | 6 |
| 7 #include "chrome/browser/background_contents_service.h" | 7 #include "chrome/browser/background_contents_service.h" |
| 8 #include "chrome/browser/browsing_instance.h" | 8 #include "chrome/browser/browsing_instance.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host.h" | 10 #include "chrome/browser/renderer_host/render_view_host.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 void BackgroundContents::ProcessDOMUIMessage( | 203 void BackgroundContents::ProcessDOMUIMessage( |
| 204 const ViewHostMsg_DomMessage_Params& params) { | 204 const ViewHostMsg_DomMessage_Params& params) { |
| 205 // TODO(rafaelw): It may make sense for extensions to be able to open | 205 // TODO(rafaelw): It may make sense for extensions to be able to open |
| 206 // BackgroundContents to chrome-extension://<id> pages. Consider implementing. | 206 // BackgroundContents to chrome-extension://<id> pages. Consider implementing. |
| 207 render_view_host_->BlockExtensionRequest(params.request_id); | 207 render_view_host_->BlockExtensionRequest(params.request_id); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void BackgroundContents::CreateNewWindow( | 210 void BackgroundContents::CreateNewWindow( |
| 211 int route_id, | 211 int route_id, |
| 212 WindowContainerType window_container_type, | 212 const ViewHostMsg_CreateWindow_Params& params) { |
| 213 const string16& frame_name) { | |
| 214 delegate_view_helper_.CreateNewWindow( | 213 delegate_view_helper_.CreateNewWindow( |
| 215 route_id, | 214 route_id, |
| 216 render_view_host_->process()->profile(), | 215 render_view_host_->process()->profile(), |
| 217 render_view_host_->site_instance(), | 216 render_view_host_->site_instance(), |
| 218 DOMUIFactory::GetDOMUIType(render_view_host_->process()->profile(), url_), | 217 DOMUIFactory::GetDOMUIType(render_view_host_->process()->profile(), url_), |
| 219 this, | 218 this, |
| 220 window_container_type, | 219 params.window_container_type, |
| 221 frame_name); | 220 params.frame_name); |
| 222 } | 221 } |
| 223 | 222 |
| 224 void BackgroundContents::CreateNewWidget(int route_id, | 223 void BackgroundContents::CreateNewWidget(int route_id, |
| 225 WebKit::WebPopupType popup_type) { | 224 WebKit::WebPopupType popup_type) { |
| 226 NOTREACHED(); | 225 NOTREACHED(); |
| 227 } | 226 } |
| 228 | 227 |
| 229 void BackgroundContents::CreateNewFullscreenWidget( | 228 void BackgroundContents::CreateNewFullscreenWidget( |
| 230 int route_id, WebKit::WebPopupType popup_type) { | 229 int route_id, WebKit::WebPopupType popup_type) { |
| 231 NOTREACHED(); | 230 NOTREACHED(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 253 BackgroundContents* | 252 BackgroundContents* |
| 254 BackgroundContents::GetBackgroundContentsByID(int render_process_id, | 253 BackgroundContents::GetBackgroundContentsByID(int render_process_id, |
| 255 int render_view_id) { | 254 int render_view_id) { |
| 256 RenderViewHost* render_view_host = | 255 RenderViewHost* render_view_host = |
| 257 RenderViewHost::FromID(render_process_id, render_view_id); | 256 RenderViewHost::FromID(render_process_id, render_view_id); |
| 258 if (!render_view_host) | 257 if (!render_view_host) |
| 259 return NULL; | 258 return NULL; |
| 260 | 259 |
| 261 return render_view_host->delegate()->GetAsBackgroundContents(); | 260 return render_view_host->delegate()->GetAsBackgroundContents(); |
| 262 } | 261 } |
| OLD | NEW |