OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "content/browser/download/save_package.h" | 31 #include "content/browser/download/save_package.h" |
32 #include "content/browser/frame_host/cross_process_frame_connector.h" | 32 #include "content/browser/frame_host/cross_process_frame_connector.h" |
33 #include "content/browser/frame_host/interstitial_page_impl.h" | 33 #include "content/browser/frame_host/interstitial_page_impl.h" |
34 #include "content/browser/frame_host/navigation_entry_impl.h" | 34 #include "content/browser/frame_host/navigation_entry_impl.h" |
35 #include "content/browser/frame_host/navigator_impl.h" | 35 #include "content/browser/frame_host/navigator_impl.h" |
36 #include "content/browser/frame_host/render_frame_host_impl.h" | 36 #include "content/browser/frame_host/render_frame_host_impl.h" |
37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
38 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 38 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
39 #include "content/browser/host_zoom_map_impl.h" | 39 #include "content/browser/host_zoom_map_impl.h" |
40 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 40 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 41 #include "content/browser/manifest/manifest_manager_host.h" |
41 #include "content/browser/media/audio_stream_monitor.h" | 42 #include "content/browser/media/audio_stream_monitor.h" |
42 #include "content/browser/media/midi_dispatcher_host.h" | 43 #include "content/browser/media/midi_dispatcher_host.h" |
43 #include "content/browser/message_port_message_filter.h" | 44 #include "content/browser/message_port_message_filter.h" |
44 #include "content/browser/message_port_service.h" | 45 #include "content/browser/message_port_service.h" |
45 #include "content/browser/power_save_blocker_impl.h" | 46 #include "content/browser/power_save_blocker_impl.h" |
46 #include "content/browser/renderer_host/render_process_host_impl.h" | 47 #include "content/browser/renderer_host/render_process_host_impl.h" |
47 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
48 #include "content/browser/renderer_host/render_view_host_impl.h" | 49 #include "content/browser/renderer_host/render_view_host_impl.h" |
49 #include "content/browser/renderer_host/render_widget_host_impl.h" | 50 #include "content/browser/renderer_host/render_widget_host_impl.h" |
50 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 51 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 registrar_.Add(this, | 1200 registrar_.Add(this, |
1200 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1201 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
1201 NotificationService::AllBrowserContextsAndSources()); | 1202 NotificationService::AllBrowserContextsAndSources()); |
1202 | 1203 |
1203 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); | 1204 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
1204 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); | 1205 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); |
1205 | 1206 |
1206 screen_orientation_dispatcher_host_.reset( | 1207 screen_orientation_dispatcher_host_.reset( |
1207 new ScreenOrientationDispatcherHostImpl(this)); | 1208 new ScreenOrientationDispatcherHostImpl(this)); |
1208 | 1209 |
| 1210 manifest_manager_host_.reset(new ManifestManagerHost(this)); |
| 1211 |
1209 #if defined(OS_ANDROID) | 1212 #if defined(OS_ANDROID) |
1210 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1213 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
1211 #endif | 1214 #endif |
1212 } | 1215 } |
1213 | 1216 |
1214 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1217 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
1215 RemoveDestructionObserver(web_contents); | 1218 RemoveDestructionObserver(web_contents); |
1216 | 1219 |
1217 // Clear the opener if it has been closed. | 1220 // Clear the opener if it has been closed. |
1218 if (web_contents == opener_) { | 1221 if (web_contents == opener_) { |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2407 | 2410 |
2408 void WebContentsImpl::InsertCSS(const std::string& css) { | 2411 void WebContentsImpl::InsertCSS(const std::string& css) { |
2409 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( | 2412 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( |
2410 GetMainFrame()->GetRoutingID(), css)); | 2413 GetMainFrame()->GetRoutingID(), css)); |
2411 } | 2414 } |
2412 | 2415 |
2413 bool WebContentsImpl::WasRecentlyAudible() { | 2416 bool WebContentsImpl::WasRecentlyAudible() { |
2414 return audio_stream_monitor_.WasRecentlyAudible(); | 2417 return audio_stream_monitor_.WasRecentlyAudible(); |
2415 } | 2418 } |
2416 | 2419 |
| 2420 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { |
| 2421 manifest_manager_host_->GetManifest(GetMainFrame(), callback); |
| 2422 } |
| 2423 |
2417 bool WebContentsImpl::FocusLocationBarByDefault() { | 2424 bool WebContentsImpl::FocusLocationBarByDefault() { |
2418 NavigationEntry* entry = controller_.GetVisibleEntry(); | 2425 NavigationEntry* entry = controller_.GetVisibleEntry(); |
2419 if (entry && entry->GetURL() == GURL(url::kAboutBlankURL)) | 2426 if (entry && entry->GetURL() == GURL(url::kAboutBlankURL)) |
2420 return true; | 2427 return true; |
2421 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); | 2428 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); |
2422 } | 2429 } |
2423 | 2430 |
2424 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { | 2431 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { |
2425 if (delegate_) | 2432 if (delegate_) |
2426 delegate_->SetFocusToLocationBar(select_all); | 2433 delegate_->SetFocusToLocationBar(select_all); |
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4334 node->render_manager()->ResumeResponseDeferredAtStart(); | 4341 node->render_manager()->ResumeResponseDeferredAtStart(); |
4335 } | 4342 } |
4336 | 4343 |
4337 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4344 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4338 force_disable_overscroll_content_ = force_disable; | 4345 force_disable_overscroll_content_ = force_disable; |
4339 if (view_) | 4346 if (view_) |
4340 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4347 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4341 } | 4348 } |
4342 | 4349 |
4343 } // namespace content | 4350 } // namespace content |
OLD | NEW |