| 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/in_process_webkit/dom_storage_context.h" | 9 #include "chrome/browser/in_process_webkit/dom_storage_context.h" |
| 10 #include "chrome/browser/in_process_webkit/webkit_context.h" | 10 #include "chrome/browser/in_process_webkit/webkit_context.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 const ViewHostMsg_DomMessage_Params& params) { | 159 const ViewHostMsg_DomMessage_Params& params) { |
| 160 // TODO(rafaelw): It may make sense for extensions to be able to open | 160 // TODO(rafaelw): It may make sense for extensions to be able to open |
| 161 // BackgroundContents to chrome-extension://<id> pages. Consider implementing. | 161 // BackgroundContents to chrome-extension://<id> pages. Consider implementing. |
| 162 render_view_host_->BlockExtensionRequest(params.request_id); | 162 render_view_host_->BlockExtensionRequest(params.request_id); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void BackgroundContents::CreateNewWindow( | 165 void BackgroundContents::CreateNewWindow( |
| 166 int route_id, | 166 int route_id, |
| 167 WindowContainerType window_container_type, | 167 WindowContainerType window_container_type, |
| 168 const string16& frame_name) { | 168 const string16& frame_name) { |
| 169 delegate_view_helper_.CreateNewWindow(route_id, | 169 delegate_view_helper_.CreateNewWindow( |
| 170 render_view_host_->process()->profile(), | 170 route_id, |
| 171 render_view_host_->site_instance(), | 171 render_view_host_->process()->profile(), |
| 172 DOMUIFactory::GetDOMUIType(url_), | 172 render_view_host_->site_instance(), |
| 173 this, | 173 DOMUIFactory::GetDOMUIType(render_view_host_->process()->profile(), url_), |
| 174 window_container_type, | 174 this, |
| 175 frame_name); | 175 window_container_type, |
| 176 frame_name); |
| 176 } | 177 } |
| 177 | 178 |
| 178 void BackgroundContents::CreateNewWidget(int route_id, | 179 void BackgroundContents::CreateNewWidget(int route_id, |
| 179 WebKit::WebPopupType popup_type) { | 180 WebKit::WebPopupType popup_type) { |
| 180 NOTREACHED(); | 181 NOTREACHED(); |
| 181 } | 182 } |
| 182 | 183 |
| 183 void BackgroundContents::CreateNewFullscreenWidget( | 184 void BackgroundContents::CreateNewFullscreenWidget( |
| 184 int route_id, WebKit::WebPopupType popup_type) { | 185 int route_id, WebKit::WebPopupType popup_type) { |
| 185 NOTREACHED(); | 186 NOTREACHED(); |
| 186 } | 187 } |
| 187 | 188 |
| 188 void BackgroundContents::ShowCreatedWindow(int route_id, | 189 void BackgroundContents::ShowCreatedWindow(int route_id, |
| 189 WindowOpenDisposition disposition, | 190 WindowOpenDisposition disposition, |
| 190 const gfx::Rect& initial_pos, | 191 const gfx::Rect& initial_pos, |
| 191 bool user_gesture) { | 192 bool user_gesture) { |
| 192 TabContents* contents = delegate_view_helper_.GetCreatedWindow(route_id); | 193 TabContents* contents = delegate_view_helper_.GetCreatedWindow(route_id); |
| 193 if (contents) | 194 if (contents) |
| 194 delegate_->AddTabContents(contents, disposition, initial_pos, user_gesture); | 195 delegate_->AddTabContents(contents, disposition, initial_pos, user_gesture); |
| 195 } | 196 } |
| 196 | 197 |
| 197 void BackgroundContents::ShowCreatedWidget(int route_id, | 198 void BackgroundContents::ShowCreatedWidget(int route_id, |
| 198 const gfx::Rect& initial_pos) { | 199 const gfx::Rect& initial_pos) { |
| 199 NOTIMPLEMENTED(); | 200 NOTIMPLEMENTED(); |
| 200 } | 201 } |
| 201 | 202 |
| 202 void BackgroundContents::ShowCreatedFullscreenWidget(int route_id) { | 203 void BackgroundContents::ShowCreatedFullscreenWidget(int route_id) { |
| 203 NOTIMPLEMENTED(); | 204 NOTIMPLEMENTED(); |
| 204 } | 205 } |
| OLD | NEW |