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

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

Issue 327573002: Properly route screen orientation IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen_lock_view
Patch Set: ScreenOrientationDispatcherHost owned by WebContentsImpl Created 6 years, 6 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 26 matching lines...) Expand all
37 #include "content/browser/host_zoom_map_impl.h" 37 #include "content/browser/host_zoom_map_impl.h"
38 #include "content/browser/loader/resource_dispatcher_host_impl.h" 38 #include "content/browser/loader/resource_dispatcher_host_impl.h"
39 #include "content/browser/message_port_message_filter.h" 39 #include "content/browser/message_port_message_filter.h"
40 #include "content/browser/message_port_service.h" 40 #include "content/browser/message_port_service.h"
41 #include "content/browser/power_save_blocker_impl.h" 41 #include "content/browser/power_save_blocker_impl.h"
42 #include "content/browser/renderer_host/render_process_host_impl.h" 42 #include "content/browser/renderer_host/render_process_host_impl.h"
43 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 43 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
44 #include "content/browser/renderer_host/render_view_host_impl.h" 44 #include "content/browser/renderer_host/render_view_host_impl.h"
45 #include "content/browser/renderer_host/render_widget_host_impl.h" 45 #include "content/browser/renderer_host/render_widget_host_impl.h"
46 #include "content/browser/renderer_host/render_widget_host_view_base.h" 46 #include "content/browser/renderer_host/render_widget_host_view_base.h"
47 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host. h"
47 #include "content/browser/site_instance_impl.h" 48 #include "content/browser/site_instance_impl.h"
48 #include "content/browser/web_contents/web_contents_view_guest.h" 49 #include "content/browser/web_contents/web_contents_view_guest.h"
49 #include "content/browser/webui/generic_handler.h" 50 #include "content/browser/webui/generic_handler.h"
50 #include "content/browser/webui/web_ui_controller_factory_registry.h" 51 #include "content/browser/webui/web_ui_controller_factory_registry.h"
51 #include "content/browser/webui/web_ui_impl.h" 52 #include "content/browser/webui/web_ui_impl.h"
52 #include "content/common/browser_plugin/browser_plugin_constants.h" 53 #include "content/common/browser_plugin/browser_plugin_constants.h"
53 #include "content/common/browser_plugin/browser_plugin_messages.h" 54 #include "content/common/browser_plugin/browser_plugin_messages.h"
54 #include "content/common/frame_messages.h" 55 #include "content/common/frame_messages.h"
55 #include "content/common/image_messages.h" 56 #include "content/common/image_messages.h"
56 #include "content/common/input_messages.h" 57 #include "content/common/input_messages.h"
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 // Listen for whether our opener gets destroyed. 1087 // Listen for whether our opener gets destroyed.
1087 if (opener_) 1088 if (opener_)
1088 AddDestructionObserver(opener_); 1089 AddDestructionObserver(opener_);
1089 1090
1090 registrar_.Add(this, 1091 registrar_.Add(this,
1091 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1092 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1092 NotificationService::AllBrowserContextsAndSources()); 1093 NotificationService::AllBrowserContextsAndSources());
1093 1094
1094 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); 1095 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this));
1095 1096
1097 screen_orientation_dispatcher_host_.reset(
1098 new ScreenOrientationDispatcherHost(this));
1099
1096 #if defined(OS_ANDROID) 1100 #if defined(OS_ANDROID)
1097 date_time_chooser_.reset(new DateTimeChooserAndroid()); 1101 date_time_chooser_.reset(new DateTimeChooserAndroid());
1098 #endif 1102 #endif
1099 } 1103 }
1100 1104
1101 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { 1105 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) {
1102 RemoveDestructionObserver(web_contents); 1106 RemoveDestructionObserver(web_contents);
1103 1107
1104 // Clear the opener if it has been closed. 1108 // Clear the opener if it has been closed.
1105 if (web_contents == opener_) { 1109 if (web_contents == opener_) {
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after
4058 4062
4059 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 4063 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
4060 if (!delegate_) 4064 if (!delegate_)
4061 return; 4065 return;
4062 const gfx::Size new_size = GetPreferredSize(); 4066 const gfx::Size new_size = GetPreferredSize();
4063 if (new_size != old_size) 4067 if (new_size != old_size)
4064 delegate_->UpdatePreferredSize(this, new_size); 4068 delegate_->UpdatePreferredSize(this, new_size);
4065 } 4069 }
4066 4070
4067 } // namespace content 4071 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698