| 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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "content/browser/download/download_stats.h" | 34 #include "content/browser/download/download_stats.h" |
| 35 #include "content/browser/download/mhtml_generation_manager.h" | 35 #include "content/browser/download/mhtml_generation_manager.h" |
| 36 #include "content/browser/download/save_package.h" | 36 #include "content/browser/download/save_package.h" |
| 37 #include "content/browser/frame_host/cross_process_frame_connector.h" | 37 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 38 #include "content/browser/frame_host/interstitial_page_impl.h" | 38 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 39 #include "content/browser/frame_host/navigation_entry_impl.h" | 39 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 40 #include "content/browser/frame_host/navigation_handle_impl.h" | 40 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 41 #include "content/browser/frame_host/navigator_impl.h" | 41 #include "content/browser/frame_host/navigator_impl.h" |
| 42 #include "content/browser/frame_host/render_frame_host_impl.h" | 42 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 43 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 43 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 44 #include "content/browser/geolocation/geolocation_service_context.h" | |
| 45 #include "content/browser/host_zoom_map_impl.h" | 44 #include "content/browser/host_zoom_map_impl.h" |
| 46 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 45 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 47 #include "content/browser/manifest/manifest_manager_host.h" | 46 #include "content/browser/manifest/manifest_manager_host.h" |
| 48 #include "content/browser/media/audio_stream_monitor.h" | 47 #include "content/browser/media/audio_stream_monitor.h" |
| 49 #include "content/browser/media/capture/web_contents_audio_muter.h" | 48 #include "content/browser/media/capture/web_contents_audio_muter.h" |
| 50 #include "content/browser/message_port_message_filter.h" | 49 #include "content/browser/message_port_message_filter.h" |
| 51 #include "content/browser/plugin_content_origin_whitelist.h" | 50 #include "content/browser/plugin_content_origin_whitelist.h" |
| 52 #include "content/browser/power_save_blocker_impl.h" | 51 #include "content/browser/power_save_blocker_impl.h" |
| 53 #include "content/browser/renderer_host/render_process_host_impl.h" | 52 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 54 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 53 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 closed_by_user_gesture_(false), | 389 closed_by_user_gesture_(false), |
| 391 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), | 390 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), |
| 392 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), | 391 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), |
| 393 render_view_message_source_(NULL), | 392 render_view_message_source_(NULL), |
| 394 render_frame_message_source_(NULL), | 393 render_frame_message_source_(NULL), |
| 395 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), | 394 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), |
| 396 fullscreen_widget_had_focus_at_shutdown_(false), | 395 fullscreen_widget_had_focus_at_shutdown_(false), |
| 397 is_subframe_(false), | 396 is_subframe_(false), |
| 398 force_disable_overscroll_content_(false), | 397 force_disable_overscroll_content_(false), |
| 399 last_dialog_suppressed_(false), | 398 last_dialog_suppressed_(false), |
| 400 geolocation_service_context_(new GeolocationServiceContext()), | |
| 401 accessibility_mode_( | 399 accessibility_mode_( |
| 402 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), | 400 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), |
| 403 audio_stream_monitor_(this), | 401 audio_stream_monitor_(this), |
| 404 virtual_keyboard_requested_(false), | 402 virtual_keyboard_requested_(false), |
| 405 page_scale_factor_is_one_(true), | 403 page_scale_factor_is_one_(true), |
| 406 loading_weak_factory_(this) { | 404 loading_weak_factory_(this) { |
| 407 frame_tree_.SetFrameRemoveListener( | 405 frame_tree_.SetFrameRemoveListener( |
| 408 base::Bind(&WebContentsImpl::OnFrameRemoved, | 406 base::Bind(&WebContentsImpl::OnFrameRemoved, |
| 409 base::Unretained(this))); | 407 base::Unretained(this))); |
| 410 #if defined(ENABLE_BROWSER_CDMS) | 408 #if defined(ENABLE_BROWSER_CDMS) |
| (...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2099 return nullptr; | 2097 return nullptr; |
| 2100 | 2098 |
| 2101 WebContents* guest = guest_manager->GetGuestByInstanceID( | 2099 WebContents* guest = guest_manager->GetGuestByInstanceID( |
| 2102 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id); | 2100 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id); |
| 2103 if (!guest) | 2101 if (!guest) |
| 2104 return nullptr; | 2102 return nullptr; |
| 2105 | 2103 |
| 2106 return guest->GetMainFrame(); | 2104 return guest->GetMainFrame(); |
| 2107 } | 2105 } |
| 2108 | 2106 |
| 2109 GeolocationServiceContext* WebContentsImpl::GetGeolocationServiceContext() { | |
| 2110 return geolocation_service_context_.get(); | |
| 2111 } | |
| 2112 | |
| 2113 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { | 2107 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { |
| 2114 return wake_lock_service_context_.get(); | 2108 return wake_lock_service_context_.get(); |
| 2115 } | 2109 } |
| 2116 | 2110 |
| 2117 void WebContentsImpl::OnShowValidationMessage( | 2111 void WebContentsImpl::OnShowValidationMessage( |
| 2118 const gfx::Rect& anchor_in_root_view, | 2112 const gfx::Rect& anchor_in_root_view, |
| 2119 const base::string16& main_text, | 2113 const base::string16& main_text, |
| 2120 const base::string16& sub_text) { | 2114 const base::string16& sub_text) { |
| 2121 if (delegate_) | 2115 if (delegate_) |
| 2122 delegate_->ShowValidationMessage( | 2116 delegate_->ShowValidationMessage( |
| (...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4764 return NULL; | 4758 return NULL; |
| 4765 } | 4759 } |
| 4766 | 4760 |
| 4767 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4761 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4768 force_disable_overscroll_content_ = force_disable; | 4762 force_disable_overscroll_content_ = force_disable; |
| 4769 if (view_) | 4763 if (view_) |
| 4770 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4764 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4771 } | 4765 } |
| 4772 | 4766 |
| 4773 } // namespace content | 4767 } // namespace content |
| OLD | NEW |