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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #include "content/browser/plugin_content_origin_whitelist.h" | 64 #include "content/browser/plugin_content_origin_whitelist.h" |
65 #include "content/browser/renderer_host/render_process_host_impl.h" | 65 #include "content/browser/renderer_host/render_process_host_impl.h" |
66 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 66 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
67 #include "content/browser/renderer_host/render_view_host_impl.h" | 67 #include "content/browser/renderer_host/render_view_host_impl.h" |
68 #include "content/browser/renderer_host/render_widget_host_impl.h" | 68 #include "content/browser/renderer_host/render_widget_host_impl.h" |
69 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 69 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
70 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 70 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
71 #include "content/browser/renderer_host/text_input_manager.h" | 71 #include "content/browser/renderer_host/text_input_manager.h" |
72 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_
impl.h" | 72 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_
impl.h" |
73 #include "content/browser/site_instance_impl.h" | 73 #include "content/browser/site_instance_impl.h" |
74 #include "content/browser/wake_lock/wake_lock_service_context.h" | |
75 #include "content/browser/web_contents/web_contents_view_child_frame.h" | 74 #include "content/browser/web_contents/web_contents_view_child_frame.h" |
76 #include "content/browser/web_contents/web_contents_view_guest.h" | 75 #include "content/browser/web_contents/web_contents_view_guest.h" |
77 #include "content/browser/webui/generic_handler.h" | 76 #include "content/browser/webui/generic_handler.h" |
78 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 77 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
79 #include "content/browser/webui/web_ui_impl.h" | 78 #include "content/browser/webui/web_ui_impl.h" |
80 #include "content/common/browser_plugin/browser_plugin_constants.h" | 79 #include "content/common/browser_plugin/browser_plugin_constants.h" |
81 #include "content/common/browser_plugin/browser_plugin_messages.h" | 80 #include "content/common/browser_plugin/browser_plugin_messages.h" |
82 #include "content/common/frame_messages.h" | 81 #include "content/common/frame_messages.h" |
83 #include "content/common/input_messages.h" | 82 #include "content/common/input_messages.h" |
84 #include "content/common/page_messages.h" | 83 #include "content/common/page_messages.h" |
(...skipping 29 matching lines...) Expand all Loading... |
114 #include "content/public/common/child_process_host.h" | 113 #include "content/public/common/child_process_host.h" |
115 #include "content/public/common/content_constants.h" | 114 #include "content/public/common/content_constants.h" |
116 #include "content/public/common/content_switches.h" | 115 #include "content/public/common/content_switches.h" |
117 #include "content/public/common/page_zoom.h" | 116 #include "content/public/common/page_zoom.h" |
118 #include "content/public/common/result_codes.h" | 117 #include "content/public/common/result_codes.h" |
119 #include "content/public/common/url_constants.h" | 118 #include "content/public/common/url_constants.h" |
120 #include "content/public/common/url_utils.h" | 119 #include "content/public/common/url_utils.h" |
121 #include "content/public/common/web_preferences.h" | 120 #include "content/public/common/web_preferences.h" |
122 #include "device/geolocation/geolocation_service_context.h" | 121 #include "device/geolocation/geolocation_service_context.h" |
123 #include "device/nfc/nfc.mojom.h" | 122 #include "device/nfc/nfc.mojom.h" |
| 123 #include "device/wake_lock/wake_lock_service_context.h" |
124 #include "net/base/url_util.h" | 124 #include "net/base/url_util.h" |
125 #include "net/http/http_cache.h" | 125 #include "net/http/http_cache.h" |
126 #include "net/http/http_transaction_factory.h" | 126 #include "net/http/http_transaction_factory.h" |
127 #include "net/url_request/url_request_context.h" | 127 #include "net/url_request/url_request_context.h" |
128 #include "net/url_request/url_request_context_getter.h" | 128 #include "net/url_request/url_request_context_getter.h" |
129 #include "services/shell/public/cpp/interface_provider.h" | 129 #include "services/shell/public/cpp/interface_provider.h" |
130 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | 130 #include "third_party/WebKit/public/web/WebSandboxFlags.h" |
131 #include "third_party/skia/include/core/SkBitmap.h" | 131 #include "third_party/skia/include/core/SkBitmap.h" |
132 #include "ui/accessibility/ax_tree_combiner.h" | 132 #include "ui/accessibility/ax_tree_combiner.h" |
133 #include "ui/base/layout.h" | 133 #include "ui/base/layout.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 base::Unretained(this))); | 456 base::Unretained(this))); |
457 #if defined(OS_ANDROID) | 457 #if defined(OS_ANDROID) |
458 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this)); | 458 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this)); |
459 #else | 459 #else |
460 media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); | 460 media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); |
461 #endif | 461 #endif |
462 #if defined (ENABLE_PLUGINS) | 462 #if defined (ENABLE_PLUGINS) |
463 pepper_playback_observer_.reset(new PepperPlaybackObserver(this)); | 463 pepper_playback_observer_.reset(new PepperPlaybackObserver(this)); |
464 #endif | 464 #endif |
465 loader_io_thread_notifier_.reset(new LoaderIOThreadNotifier(this)); | 465 loader_io_thread_notifier_.reset(new LoaderIOThreadNotifier(this)); |
466 wake_lock_service_context_.reset(new WakeLockServiceContext( | 466 wake_lock_service_context_.reset(new device::WakeLockServiceContext( |
467 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 467 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
468 base::Bind(&WebContentsImpl::GetNativeView, base::Unretained(this)))); | 468 base::Bind(&WebContentsImpl::GetNativeView, base::Unretained(this)))); |
469 } | 469 } |
470 | 470 |
471 WebContentsImpl::~WebContentsImpl() { | 471 WebContentsImpl::~WebContentsImpl() { |
472 is_being_destroyed_ = true; | 472 is_being_destroyed_ = true; |
473 | 473 |
474 rwh_input_event_router_.reset(); | 474 rwh_input_event_router_.reset(); |
475 | 475 |
476 for (auto& entry : binding_sets_) | 476 for (auto& entry : binding_sets_) |
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2415 return nullptr; | 2415 return nullptr; |
2416 | 2416 |
2417 return guest->GetMainFrame(); | 2417 return guest->GetMainFrame(); |
2418 } | 2418 } |
2419 | 2419 |
2420 device::GeolocationServiceContext* | 2420 device::GeolocationServiceContext* |
2421 WebContentsImpl::GetGeolocationServiceContext() { | 2421 WebContentsImpl::GetGeolocationServiceContext() { |
2422 return geolocation_service_context_.get(); | 2422 return geolocation_service_context_.get(); |
2423 } | 2423 } |
2424 | 2424 |
2425 WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { | 2425 device::WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { |
2426 return wake_lock_service_context_.get(); | 2426 return wake_lock_service_context_.get(); |
2427 } | 2427 } |
2428 | 2428 |
2429 void WebContentsImpl::OnShowValidationMessage( | 2429 void WebContentsImpl::OnShowValidationMessage( |
2430 const gfx::Rect& anchor_in_root_view, | 2430 const gfx::Rect& anchor_in_root_view, |
2431 const base::string16& main_text, | 2431 const base::string16& main_text, |
2432 const base::string16& sub_text) { | 2432 const base::string16& sub_text) { |
2433 if (delegate_) | 2433 if (delegate_) |
2434 delegate_->ShowValidationMessage( | 2434 delegate_->ShowValidationMessage( |
2435 this, anchor_in_root_view, main_text, sub_text); | 2435 this, anchor_in_root_view, main_text, sub_text); |
(...skipping 2831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5267 dialog_manager_ = dialog_manager; | 5267 dialog_manager_ = dialog_manager; |
5268 } | 5268 } |
5269 | 5269 |
5270 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5270 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
5271 auto it = binding_sets_.find(interface_name); | 5271 auto it = binding_sets_.find(interface_name); |
5272 if (it != binding_sets_.end()) | 5272 if (it != binding_sets_.end()) |
5273 binding_sets_.erase(it); | 5273 binding_sets_.erase(it); |
5274 } | 5274 } |
5275 | 5275 |
5276 } // namespace content | 5276 } // namespace content |
OLD | NEW |