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

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

Issue 2682643002: [ScreenOrientation] Hide ScreenOrientationProvider inside WebContentsImpl. (Closed)
Patch Set: Rebase only Created 3 years, 10 months 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "content/browser/media/session/media_session_impl.h" 67 #include "content/browser/media/session/media_session_impl.h"
68 #include "content/browser/message_port_message_filter.h" 68 #include "content/browser/message_port_message_filter.h"
69 #include "content/browser/plugin_content_origin_whitelist.h" 69 #include "content/browser/plugin_content_origin_whitelist.h"
70 #include "content/browser/renderer_host/render_process_host_impl.h" 70 #include "content/browser/renderer_host/render_process_host_impl.h"
71 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 71 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
72 #include "content/browser/renderer_host/render_view_host_impl.h" 72 #include "content/browser/renderer_host/render_view_host_impl.h"
73 #include "content/browser/renderer_host/render_widget_host_impl.h" 73 #include "content/browser/renderer_host/render_widget_host_impl.h"
74 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" 74 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
75 #include "content/browser/renderer_host/render_widget_host_view_base.h" 75 #include "content/browser/renderer_host/render_widget_host_view_base.h"
76 #include "content/browser/renderer_host/text_input_manager.h" 76 #include "content/browser/renderer_host/text_input_manager.h"
77 #include "content/browser/screen_orientation/screen_orientation_provider.h"
77 #include "content/browser/site_instance_impl.h" 78 #include "content/browser/site_instance_impl.h"
78 #include "content/browser/web_contents/web_contents_view_child_frame.h" 79 #include "content/browser/web_contents/web_contents_view_child_frame.h"
79 #include "content/browser/web_contents/web_contents_view_guest.h" 80 #include "content/browser/web_contents/web_contents_view_guest.h"
80 #include "content/browser/webui/generic_handler.h" 81 #include "content/browser/webui/generic_handler.h"
81 #include "content/browser/webui/web_ui_controller_factory_registry.h" 82 #include "content/browser/webui/web_ui_controller_factory_registry.h"
82 #include "content/browser/webui/web_ui_impl.h" 83 #include "content/browser/webui/web_ui_impl.h"
83 #include "content/common/browser_plugin/browser_plugin_constants.h" 84 #include "content/common/browser_plugin/browser_plugin_constants.h"
84 #include "content/common/browser_plugin/browser_plugin_messages.h" 85 #include "content/common/browser_plugin/browser_plugin_messages.h"
85 #include "content/common/drag_messages.h" 86 #include "content/common/drag_messages.h"
86 #include "content/common/frame_messages.h" 87 #include "content/common/frame_messages.h"
(...skipping 13 matching lines...) Expand all
100 #include "content/public/browser/guest_mode.h" 101 #include "content/public/browser/guest_mode.h"
101 #include "content/public/browser/invalidate_type.h" 102 #include "content/public/browser/invalidate_type.h"
102 #include "content/public/browser/javascript_dialog_manager.h" 103 #include "content/public/browser/javascript_dialog_manager.h"
103 #include "content/public/browser/load_notification_details.h" 104 #include "content/public/browser/load_notification_details.h"
104 #include "content/public/browser/navigation_details.h" 105 #include "content/public/browser/navigation_details.h"
105 #include "content/public/browser/notification_details.h" 106 #include "content/public/browser/notification_details.h"
106 #include "content/public/browser/notification_service.h" 107 #include "content/public/browser/notification_service.h"
107 #include "content/public/browser/notification_types.h" 108 #include "content/public/browser/notification_types.h"
108 #include "content/public/browser/render_widget_host_iterator.h" 109 #include "content/public/browser/render_widget_host_iterator.h"
109 #include "content/public/browser/resource_request_details.h" 110 #include "content/public/browser/resource_request_details.h"
110 #include "content/public/browser/screen_orientation_provider.h"
111 #include "content/public/browser/security_style_explanations.h" 111 #include "content/public/browser/security_style_explanations.h"
112 #include "content/public/browser/ssl_status.h" 112 #include "content/public/browser/ssl_status.h"
113 #include "content/public/browser/storage_partition.h" 113 #include "content/public/browser/storage_partition.h"
114 #include "content/public/browser/user_metrics.h" 114 #include "content/public/browser/user_metrics.h"
115 #include "content/public/browser/web_contents_binding_set.h" 115 #include "content/public/browser/web_contents_binding_set.h"
116 #include "content/public/browser/web_contents_delegate.h" 116 #include "content/public/browser/web_contents_delegate.h"
117 #include "content/public/browser/web_contents_unresponsive_state.h" 117 #include "content/public/browser/web_contents_unresponsive_state.h"
118 #include "content/public/common/bindings_policy.h" 118 #include "content/public/common/bindings_policy.h"
119 #include "content/public/common/browser_side_navigation_policy.h" 119 #include "content/public/common/browser_side_navigation_policy.h"
120 #include "content/public/common/child_process_host.h" 120 #include "content/public/common/child_process_host.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 WebContents* WebContents::FromFrameTreeNodeId(int frame_tree_node_id) { 319 WebContents* WebContents::FromFrameTreeNodeId(int frame_tree_node_id) {
320 FrameTreeNode* frame_tree_node = 320 FrameTreeNode* frame_tree_node =
321 FrameTreeNode::GloballyFindByID(frame_tree_node_id); 321 FrameTreeNode::GloballyFindByID(frame_tree_node_id);
322 if (!frame_tree_node) 322 if (!frame_tree_node)
323 return nullptr; 323 return nullptr;
324 return FromRenderFrameHost(frame_tree_node->current_frame_host()); 324 return FromRenderFrameHost(frame_tree_node->current_frame_host());
325 } 325 }
326 326
327 void WebContents::SetScreenOrientationDelegate(
328 ScreenOrientationDelegate* delegate) {
329 ScreenOrientationProvider::SetDelegate(delegate);
330 }
331
327 // WebContentsImpl::DestructionObserver ---------------------------------------- 332 // WebContentsImpl::DestructionObserver ----------------------------------------
328 333
329 class WebContentsImpl::DestructionObserver : public WebContentsObserver { 334 class WebContentsImpl::DestructionObserver : public WebContentsObserver {
330 public: 335 public:
331 DestructionObserver(WebContentsImpl* owner, WebContents* watched_contents) 336 DestructionObserver(WebContentsImpl* owner, WebContents* watched_contents)
332 : WebContentsObserver(watched_contents), 337 : WebContentsObserver(watched_contents),
333 owner_(owner) { 338 owner_(owner) {
334 } 339 }
335 340
336 // WebContentsObserver: 341 // WebContentsObserver:
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 const { 927 const {
923 if (auto widget_host = GetFullscreenRenderWidgetHost()) 928 if (auto widget_host = GetFullscreenRenderWidgetHost())
924 return widget_host->GetView(); 929 return widget_host->GetView();
925 return nullptr; 930 return nullptr;
926 } 931 }
927 932
928 WebContentsView* WebContentsImpl::GetView() const { 933 WebContentsView* WebContentsImpl::GetView() const {
929 return view_.get(); 934 return view_.get();
930 } 935 }
931 936
932 ScreenOrientationProvider* WebContentsImpl::GetScreenOrientationProvider() 937 void WebContentsImpl::OnScreenOrientationChange() {
933 const { 938 DCHECK(screen_orientation_provider_);
934 return screen_orientation_provider_.get(); 939 return screen_orientation_provider_->OnOrientationChange();
935 } 940 }
936 941
937 SkColor WebContentsImpl::GetThemeColor() const { 942 SkColor WebContentsImpl::GetThemeColor() const {
938 return theme_color_; 943 return theme_color_;
939 } 944 }
940 945
941 void WebContentsImpl::SetAccessibilityMode(AccessibilityMode mode) { 946 void WebContentsImpl::SetAccessibilityMode(AccessibilityMode mode) {
942 if (mode == accessibility_mode_) 947 if (mode == accessibility_mode_)
943 return; 948 return;
944 949
(...skipping 4462 matching lines...) Expand 10 before | Expand all | Expand 10 after
5407 GetMainFrame()->AddMessageToConsole( 5412 GetMainFrame()->AddMessageToConsole(
5408 content::CONSOLE_MESSAGE_LEVEL_WARNING, 5413 content::CONSOLE_MESSAGE_LEVEL_WARNING,
5409 base::StringPrintf("This site does not have a valid SSL " 5414 base::StringPrintf("This site does not have a valid SSL "
5410 "certificate! Without SSL, your site's and " 5415 "certificate! Without SSL, your site's and "
5411 "visitors' data is vulnerable to theft and " 5416 "visitors' data is vulnerable to theft and "
5412 "tampering. Get a valid SSL certificate before" 5417 "tampering. Get a valid SSL certificate before"
5413 " releasing your website to the public.")); 5418 " releasing your website to the public."));
5414 } 5419 }
5415 5420
5416 } // namespace content 5421 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698