Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2391883006: Mojo-ify implementation of screen orientation locking/unlocking. (Closed)
Patch Set: Codereview update Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
64 #include "content/browser/media/session/media_session_impl.h" 64 #include "content/browser/media/session/media_session_impl.h"
65 #include "content/browser/message_port_message_filter.h" 65 #include "content/browser/message_port_message_filter.h"
66 #include "content/browser/plugin_content_origin_whitelist.h" 66 #include "content/browser/plugin_content_origin_whitelist.h"
67 #include "content/browser/renderer_host/render_process_host_impl.h" 67 #include "content/browser/renderer_host/render_process_host_impl.h"
68 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 68 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
69 #include "content/browser/renderer_host/render_view_host_impl.h" 69 #include "content/browser/renderer_host/render_view_host_impl.h"
70 #include "content/browser/renderer_host/render_widget_host_impl.h" 70 #include "content/browser/renderer_host/render_widget_host_impl.h"
71 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" 71 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
72 #include "content/browser/renderer_host/render_widget_host_view_base.h" 72 #include "content/browser/renderer_host/render_widget_host_view_base.h"
73 #include "content/browser/renderer_host/text_input_manager.h" 73 #include "content/browser/renderer_host/text_input_manager.h"
74 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h" 74 #include "content/browser/screen_orientation/screen_orientation.h"
75 #include "content/browser/site_instance_impl.h" 75 #include "content/browser/site_instance_impl.h"
76 #include "content/browser/web_contents/web_contents_view_child_frame.h" 76 #include "content/browser/web_contents/web_contents_view_child_frame.h"
77 #include "content/browser/web_contents/web_contents_view_guest.h" 77 #include "content/browser/web_contents/web_contents_view_guest.h"
78 #include "content/browser/webui/generic_handler.h" 78 #include "content/browser/webui/generic_handler.h"
79 #include "content/browser/webui/web_ui_controller_factory_registry.h" 79 #include "content/browser/webui/web_ui_controller_factory_registry.h"
80 #include "content/browser/webui/web_ui_impl.h" 80 #include "content/browser/webui/web_ui_impl.h"
81 #include "content/common/browser_plugin/browser_plugin_constants.h" 81 #include "content/common/browser_plugin/browser_plugin_constants.h"
82 #include "content/common/browser_plugin/browser_plugin_messages.h" 82 #include "content/common/browser_plugin/browser_plugin_messages.h"
83 #include "content/common/frame_messages.h" 83 #include "content/common/frame_messages.h"
84 #include "content/common/input_messages.h" 84 #include "content/common/input_messages.h"
(...skipping 11 matching lines...) Expand all
96 #include "content/public/browser/guest_mode.h" 96 #include "content/public/browser/guest_mode.h"
97 #include "content/public/browser/invalidate_type.h" 97 #include "content/public/browser/invalidate_type.h"
98 #include "content/public/browser/javascript_dialog_manager.h" 98 #include "content/public/browser/javascript_dialog_manager.h"
99 #include "content/public/browser/load_notification_details.h" 99 #include "content/public/browser/load_notification_details.h"
100 #include "content/public/browser/navigation_details.h" 100 #include "content/public/browser/navigation_details.h"
101 #include "content/public/browser/notification_details.h" 101 #include "content/public/browser/notification_details.h"
102 #include "content/public/browser/notification_service.h" 102 #include "content/public/browser/notification_service.h"
103 #include "content/public/browser/notification_types.h" 103 #include "content/public/browser/notification_types.h"
104 #include "content/public/browser/render_widget_host_iterator.h" 104 #include "content/public/browser/render_widget_host_iterator.h"
105 #include "content/public/browser/resource_request_details.h" 105 #include "content/public/browser/resource_request_details.h"
106 #include "content/public/browser/screen_orientation_dispatcher_host.h" 106 #include "content/public/browser/screen_orientation_provider.h"
107 #include "content/public/browser/security_style_explanations.h" 107 #include "content/public/browser/security_style_explanations.h"
108 #include "content/public/browser/storage_partition.h" 108 #include "content/public/browser/storage_partition.h"
109 #include "content/public/browser/user_metrics.h" 109 #include "content/public/browser/user_metrics.h"
110 #include "content/public/browser/web_contents_binding_set.h" 110 #include "content/public/browser/web_contents_binding_set.h"
111 #include "content/public/browser/web_contents_delegate.h" 111 #include "content/public/browser/web_contents_delegate.h"
112 #include "content/public/browser/web_contents_unresponsive_state.h" 112 #include "content/public/browser/web_contents_unresponsive_state.h"
113 #include "content/public/common/bindings_policy.h" 113 #include "content/public/common/bindings_policy.h"
114 #include "content/public/common/browser_side_navigation_policy.h" 114 #include "content/public/common/browser_side_navigation_policy.h"
115 #include "content/public/common/child_process_host.h" 115 #include "content/public/common/child_process_host.h"
116 #include "content/public/common/content_constants.h" 116 #include "content/public/common/content_constants.h"
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 1610
1611 #if defined(ENABLE_PLUGINS) 1611 #if defined(ENABLE_PLUGINS)
1612 plugin_content_origin_whitelist_.reset( 1612 plugin_content_origin_whitelist_.reset(
1613 new PluginContentOriginWhitelist(this)); 1613 new PluginContentOriginWhitelist(this));
1614 #endif 1614 #endif
1615 1615
1616 registrar_.Add(this, 1616 registrar_.Add(this,
1617 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1617 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1618 NotificationService::AllBrowserContextsAndSources()); 1618 NotificationService::AllBrowserContextsAndSources());
1619 1619
1620 screen_orientation_dispatcher_host_.reset( 1620 screen_orientation_.reset(new ScreenOrientation(this));
1621 new ScreenOrientationDispatcherHostImpl(this));
1622 1621
1623 manifest_manager_host_.reset(new ManifestManagerHost(this)); 1622 manifest_manager_host_.reset(new ManifestManagerHost(this));
1624 1623
1625 #if defined(OS_ANDROID) 1624 #if defined(OS_ANDROID)
1626 date_time_chooser_.reset(new DateTimeChooserAndroid()); 1625 date_time_chooser_.reset(new DateTimeChooserAndroid());
1627 #endif 1626 #endif
1628 1627
1629 // BrowserPluginGuest::Init needs to be called after this WebContents has 1628 // BrowserPluginGuest::Init needs to be called after this WebContents has
1630 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above. 1629 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above.
1631 if (browser_plugin_guest_) 1630 if (browser_plugin_guest_)
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 2427
2429 device::GeolocationServiceContext* 2428 device::GeolocationServiceContext*
2430 WebContentsImpl::GetGeolocationServiceContext() { 2429 WebContentsImpl::GetGeolocationServiceContext() {
2431 return geolocation_service_context_.get(); 2430 return geolocation_service_context_.get();
2432 } 2431 }
2433 2432
2434 device::WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { 2433 device::WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() {
2435 return wake_lock_service_context_.get(); 2434 return wake_lock_service_context_.get();
2436 } 2435 }
2437 2436
2437 ScreenOrientationProvider* WebContentsImpl::GetScreenOrientationProvider() {
2438 return screen_orientation_.get()->GetScreenOrientationProvider();
2439 }
2440
2438 void WebContentsImpl::OnShowValidationMessage( 2441 void WebContentsImpl::OnShowValidationMessage(
2439 const gfx::Rect& anchor_in_root_view, 2442 const gfx::Rect& anchor_in_root_view,
2440 const base::string16& main_text, 2443 const base::string16& main_text,
2441 const base::string16& sub_text) { 2444 const base::string16& sub_text) {
2442 if (delegate_) 2445 if (delegate_)
2443 delegate_->ShowValidationMessage( 2446 delegate_->ShowValidationMessage(
2444 this, anchor_in_root_view, main_text, sub_text); 2447 this, anchor_in_root_view, main_text, sub_text);
2445 } 2448 }
2446 2449
2447 void WebContentsImpl::OnHideValidationMessage() { 2450 void WebContentsImpl::OnHideValidationMessage() {
(...skipping 2779 matching lines...) Expand 10 before | Expand all | Expand 10 after
5227 dialog_manager_ = dialog_manager; 5230 dialog_manager_ = dialog_manager;
5228 } 5231 }
5229 5232
5230 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5233 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5231 auto it = binding_sets_.find(interface_name); 5234 auto it = binding_sets_.find(interface_name);
5232 if (it != binding_sets_.end()) 5235 if (it != binding_sets_.end())
5233 binding_sets_.erase(it); 5236 binding_sets_.erase(it);
5234 } 5237 }
5235 5238
5236 } // namespace content 5239 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698