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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "content/browser/download/save_package.h" | 43 #include "content/browser/download/save_package.h" |
44 #include "content/browser/find_request_manager.h" | 44 #include "content/browser/find_request_manager.h" |
45 #include "content/browser/frame_host/cross_process_frame_connector.h" | 45 #include "content/browser/frame_host/cross_process_frame_connector.h" |
46 #include "content/browser/frame_host/interstitial_page_impl.h" | 46 #include "content/browser/frame_host/interstitial_page_impl.h" |
47 #include "content/browser/frame_host/navigation_entry_impl.h" | 47 #include "content/browser/frame_host/navigation_entry_impl.h" |
48 #include "content/browser/frame_host/navigation_handle_impl.h" | 48 #include "content/browser/frame_host/navigation_handle_impl.h" |
49 #include "content/browser/frame_host/navigator_impl.h" | 49 #include "content/browser/frame_host/navigator_impl.h" |
50 #include "content/browser/frame_host/render_frame_host_impl.h" | 50 #include "content/browser/frame_host/render_frame_host_impl.h" |
51 #include "content/browser/frame_host/render_frame_proxy_host.h" | 51 #include "content/browser/frame_host/render_frame_proxy_host.h" |
52 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 52 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
53 #include "content/browser/geolocation/geolocation_service_context.h" | |
54 #include "content/browser/host_zoom_map_impl.h" | 53 #include "content/browser/host_zoom_map_impl.h" |
55 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 54 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
56 #include "content/browser/manifest/manifest_manager_host.h" | 55 #include "content/browser/manifest/manifest_manager_host.h" |
57 #include "content/browser/media/audio_stream_monitor.h" | 56 #include "content/browser/media/audio_stream_monitor.h" |
58 #include "content/browser/media/capture/web_contents_audio_muter.h" | 57 #include "content/browser/media/capture/web_contents_audio_muter.h" |
59 #include "content/browser/media/media_web_contents_observer.h" | 58 #include "content/browser/media/media_web_contents_observer.h" |
60 #include "content/browser/media/session/media_session.h" | 59 #include "content/browser/media/session/media_session.h" |
61 #include "content/browser/message_port_message_filter.h" | 60 #include "content/browser/message_port_message_filter.h" |
62 #include "content/browser/plugin_content_origin_whitelist.h" | 61 #include "content/browser/plugin_content_origin_whitelist.h" |
63 #include "content/browser/renderer_host/render_process_host_impl.h" | 62 #include "content/browser/renderer_host/render_process_host_impl.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 #include "content/public/common/browser_side_navigation_policy.h" | 110 #include "content/public/common/browser_side_navigation_policy.h" |
112 #include "content/public/common/child_process_host.h" | 111 #include "content/public/common/child_process_host.h" |
113 #include "content/public/common/content_constants.h" | 112 #include "content/public/common/content_constants.h" |
114 #include "content/public/common/content_switches.h" | 113 #include "content/public/common/content_switches.h" |
115 #include "content/public/common/page_zoom.h" | 114 #include "content/public/common/page_zoom.h" |
116 #include "content/public/common/result_codes.h" | 115 #include "content/public/common/result_codes.h" |
117 #include "content/public/common/security_style.h" | 116 #include "content/public/common/security_style.h" |
118 #include "content/public/common/url_constants.h" | 117 #include "content/public/common/url_constants.h" |
119 #include "content/public/common/url_utils.h" | 118 #include "content/public/common/url_utils.h" |
120 #include "content/public/common/web_preferences.h" | 119 #include "content/public/common/web_preferences.h" |
| 120 #include "device/geolocation/geolocation_service_context.h" |
121 #include "net/base/url_util.h" | 121 #include "net/base/url_util.h" |
122 #include "net/http/http_cache.h" | 122 #include "net/http/http_cache.h" |
123 #include "net/http/http_transaction_factory.h" | 123 #include "net/http/http_transaction_factory.h" |
124 #include "net/url_request/url_request_context.h" | 124 #include "net/url_request/url_request_context.h" |
125 #include "net/url_request/url_request_context_getter.h" | 125 #include "net/url_request/url_request_context_getter.h" |
126 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 126 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
127 #include "third_party/skia/include/core/SkBitmap.h" | 127 #include "third_party/skia/include/core/SkBitmap.h" |
128 #include "ui/accessibility/ax_tree_combiner.h" | 128 #include "ui/accessibility/ax_tree_combiner.h" |
129 #include "ui/base/layout.h" | 129 #include "ui/base/layout.h" |
130 #include "ui/gl/gl_switches.h" | 130 #include "ui/gl/gl_switches.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), | 421 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), |
422 zoom_scroll_remainder_(0), | 422 zoom_scroll_remainder_(0), |
423 render_view_message_source_(NULL), | 423 render_view_message_source_(NULL), |
424 render_frame_message_source_(NULL), | 424 render_frame_message_source_(NULL), |
425 fullscreen_widget_process_id_(ChildProcessHost::kInvalidUniqueID), | 425 fullscreen_widget_process_id_(ChildProcessHost::kInvalidUniqueID), |
426 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), | 426 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), |
427 fullscreen_widget_had_focus_at_shutdown_(false), | 427 fullscreen_widget_had_focus_at_shutdown_(false), |
428 is_subframe_(false), | 428 is_subframe_(false), |
429 force_disable_overscroll_content_(false), | 429 force_disable_overscroll_content_(false), |
430 last_dialog_suppressed_(false), | 430 last_dialog_suppressed_(false), |
431 geolocation_service_context_(new GeolocationServiceContext()), | 431 geolocation_service_context_(new device::GeolocationServiceContext()), |
432 accessibility_mode_( | 432 accessibility_mode_( |
433 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), | 433 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), |
434 audio_stream_monitor_(this), | 434 audio_stream_monitor_(this), |
435 bluetooth_connected_device_count_(0), | 435 bluetooth_connected_device_count_(0), |
436 virtual_keyboard_requested_(false), | 436 virtual_keyboard_requested_(false), |
437 page_scale_factor_is_one_(true), | 437 page_scale_factor_is_one_(true), |
438 mouse_lock_widget_(nullptr), | 438 mouse_lock_widget_(nullptr), |
439 loading_weak_factory_(this), | 439 loading_weak_factory_(this), |
440 weak_factory_(this) { | 440 weak_factory_(this) { |
441 frame_tree_.SetFrameRemoveListener( | 441 frame_tree_.SetFrameRemoveListener( |
(...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2378 return nullptr; | 2378 return nullptr; |
2379 | 2379 |
2380 WebContents* guest = guest_manager->GetGuestByInstanceID( | 2380 WebContents* guest = guest_manager->GetGuestByInstanceID( |
2381 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id); | 2381 render_frame_host->GetProcess()->GetID(), browser_plugin_instance_id); |
2382 if (!guest) | 2382 if (!guest) |
2383 return nullptr; | 2383 return nullptr; |
2384 | 2384 |
2385 return guest->GetMainFrame(); | 2385 return guest->GetMainFrame(); |
2386 } | 2386 } |
2387 | 2387 |
2388 GeolocationServiceContext* WebContentsImpl::GetGeolocationServiceContext() { | 2388 device::GeolocationServiceContext* |
| 2389 WebContentsImpl::GetGeolocationServiceContext() { |
2389 return geolocation_service_context_.get(); | 2390 return geolocation_service_context_.get(); |
2390 } | 2391 } |
2391 | 2392 |
2392 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { | 2393 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { |
2393 return wake_lock_service_context_.get(); | 2394 return wake_lock_service_context_.get(); |
2394 } | 2395 } |
2395 | 2396 |
2396 void WebContentsImpl::OnShowValidationMessage( | 2397 void WebContentsImpl::OnShowValidationMessage( |
2397 const gfx::Rect& anchor_in_root_view, | 2398 const gfx::Rect& anchor_in_root_view, |
2398 const base::string16& main_text, | 2399 const base::string16& main_text, |
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5207 for (RenderViewHost* render_view_host : render_view_host_set) | 5208 for (RenderViewHost* render_view_host : render_view_host_set) |
5208 render_view_host->OnWebkitPreferencesChanged(); | 5209 render_view_host->OnWebkitPreferencesChanged(); |
5209 } | 5210 } |
5210 | 5211 |
5211 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5212 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5212 JavaScriptDialogManager* dialog_manager) { | 5213 JavaScriptDialogManager* dialog_manager) { |
5213 dialog_manager_ = dialog_manager; | 5214 dialog_manager_ = dialog_manager; |
5214 } | 5215 } |
5215 | 5216 |
5216 } // namespace content | 5217 } // namespace content |
OLD | NEW |