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/midi_dispatcher_host.h" | 42 #include "content/browser/media/midi_dispatcher_host.h" |
42 #include "content/browser/message_port_message_filter.h" | 43 #include "content/browser/message_port_message_filter.h" |
43 #include "content/browser/message_port_service.h" | 44 #include "content/browser/message_port_service.h" |
44 #include "content/browser/power_save_blocker_impl.h" | 45 #include "content/browser/power_save_blocker_impl.h" |
45 #include "content/browser/renderer_host/render_process_host_impl.h" | 46 #include "content/browser/renderer_host/render_process_host_impl.h" |
46 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 47 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
47 #include "content/browser/renderer_host/render_view_host_impl.h" | 48 #include "content/browser/renderer_host/render_view_host_impl.h" |
48 #include "content/browser/renderer_host/render_widget_host_impl.h" | 49 #include "content/browser/renderer_host/render_widget_host_impl.h" |
49 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 50 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
50 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" | 51 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 registrar_.Add(this, | 1178 registrar_.Add(this, |
1178 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1179 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
1179 NotificationService::AllBrowserContextsAndSources()); | 1180 NotificationService::AllBrowserContextsAndSources()); |
1180 | 1181 |
1181 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); | 1182 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
1182 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); | 1183 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); |
1183 | 1184 |
1184 screen_orientation_dispatcher_host_.reset( | 1185 screen_orientation_dispatcher_host_.reset( |
1185 new ScreenOrientationDispatcherHost(this)); | 1186 new ScreenOrientationDispatcherHost(this)); |
1186 | 1187 |
| 1188 manifest_manager_host_.reset(new ManifestManagerHost(this)); |
| 1189 |
1187 #if defined(OS_ANDROID) | 1190 #if defined(OS_ANDROID) |
1188 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1191 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
1189 #endif | 1192 #endif |
1190 } | 1193 } |
1191 | 1194 |
1192 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1195 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
1193 RemoveDestructionObserver(web_contents); | 1196 RemoveDestructionObserver(web_contents); |
1194 | 1197 |
1195 // Clear the opener if it has been closed. | 1198 // Clear the opener if it has been closed. |
1196 if (web_contents == opener_) { | 1199 if (web_contents == opener_) { |
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2381 | 2384 |
2382 void WebContentsImpl::StopFinding(StopFindAction action) { | 2385 void WebContentsImpl::StopFinding(StopFindAction action) { |
2383 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); | 2386 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); |
2384 } | 2387 } |
2385 | 2388 |
2386 void WebContentsImpl::InsertCSS(const std::string& css) { | 2389 void WebContentsImpl::InsertCSS(const std::string& css) { |
2387 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( | 2390 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( |
2388 GetMainFrame()->GetRoutingID(), css)); | 2391 GetMainFrame()->GetRoutingID(), css)); |
2389 } | 2392 } |
2390 | 2393 |
| 2394 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { |
| 2395 manifest_manager_host_->GetManifest(GetMainFrame(), callback); |
| 2396 } |
| 2397 |
2391 bool WebContentsImpl::FocusLocationBarByDefault() { | 2398 bool WebContentsImpl::FocusLocationBarByDefault() { |
2392 NavigationEntry* entry = controller_.GetVisibleEntry(); | 2399 NavigationEntry* entry = controller_.GetVisibleEntry(); |
2393 if (entry && entry->GetURL() == GURL(url::kAboutBlankURL)) | 2400 if (entry && entry->GetURL() == GURL(url::kAboutBlankURL)) |
2394 return true; | 2401 return true; |
2395 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); | 2402 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); |
2396 } | 2403 } |
2397 | 2404 |
2398 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { | 2405 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { |
2399 if (delegate_) | 2406 if (delegate_) |
2400 delegate_->SetFocusToLocationBar(select_all); | 2407 delegate_->SetFocusToLocationBar(select_all); |
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4246 node->render_manager()->ResumeResponseDeferredAtStart(); | 4253 node->render_manager()->ResumeResponseDeferredAtStart(); |
4247 } | 4254 } |
4248 | 4255 |
4249 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4256 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4250 force_disable_overscroll_content_ = force_disable; | 4257 force_disable_overscroll_content_ = force_disable; |
4251 if (view_) | 4258 if (view_) |
4252 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4259 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4253 } | 4260 } |
4254 | 4261 |
4255 } // namespace content | 4262 } // namespace content |
OLD | NEW |