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 <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 27 matching lines...) Expand all Loading... |
38 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 38 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
39 #include "content/browser/media/midi_dispatcher_host.h" | 39 #include "content/browser/media/midi_dispatcher_host.h" |
40 #include "content/browser/message_port_message_filter.h" | 40 #include "content/browser/message_port_message_filter.h" |
41 #include "content/browser/message_port_service.h" | 41 #include "content/browser/message_port_service.h" |
42 #include "content/browser/power_save_blocker_impl.h" | 42 #include "content/browser/power_save_blocker_impl.h" |
43 #include "content/browser/renderer_host/render_process_host_impl.h" | 43 #include "content/browser/renderer_host/render_process_host_impl.h" |
44 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 44 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
45 #include "content/browser/renderer_host/render_view_host_impl.h" | 45 #include "content/browser/renderer_host/render_view_host_impl.h" |
46 #include "content/browser/renderer_host/render_widget_host_impl.h" | 46 #include "content/browser/renderer_host/render_widget_host_impl.h" |
47 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 47 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
48 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" | |
49 #include "content/browser/site_instance_impl.h" | 48 #include "content/browser/site_instance_impl.h" |
50 #include "content/browser/web_contents/web_contents_view_guest.h" | 49 #include "content/browser/web_contents/web_contents_view_guest.h" |
51 #include "content/browser/webui/generic_handler.h" | 50 #include "content/browser/webui/generic_handler.h" |
52 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 51 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
53 #include "content/browser/webui/web_ui_impl.h" | 52 #include "content/browser/webui/web_ui_impl.h" |
54 #include "content/common/browser_plugin/browser_plugin_constants.h" | 53 #include "content/common/browser_plugin/browser_plugin_constants.h" |
55 #include "content/common/browser_plugin/browser_plugin_messages.h" | 54 #include "content/common/browser_plugin/browser_plugin_messages.h" |
56 #include "content/common/frame_messages.h" | 55 #include "content/common/frame_messages.h" |
57 #include "content/common/image_messages.h" | 56 #include "content/common/image_messages.h" |
58 #include "content/common/input_messages.h" | 57 #include "content/common/input_messages.h" |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 if (opener_) | 1090 if (opener_) |
1092 AddDestructionObserver(opener_); | 1091 AddDestructionObserver(opener_); |
1093 | 1092 |
1094 registrar_.Add(this, | 1093 registrar_.Add(this, |
1095 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1094 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
1096 NotificationService::AllBrowserContextsAndSources()); | 1095 NotificationService::AllBrowserContextsAndSources()); |
1097 | 1096 |
1098 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); | 1097 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
1099 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); | 1098 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); |
1100 | 1099 |
1101 screen_orientation_dispatcher_host_.reset( | |
1102 new ScreenOrientationDispatcherHost(this)); | |
1103 | |
1104 #if defined(OS_ANDROID) | 1100 #if defined(OS_ANDROID) |
1105 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1101 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
1106 #endif | 1102 #endif |
1107 } | 1103 } |
1108 | 1104 |
1109 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1105 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
1110 RemoveDestructionObserver(web_contents); | 1106 RemoveDestructionObserver(web_contents); |
1111 | 1107 |
1112 // Clear the opener if it has been closed. | 1108 // Clear the opener if it has been closed. |
1113 if (web_contents == opener_) { | 1109 if (web_contents == opener_) { |
(...skipping 2958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4072 | 4068 |
4073 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 4069 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
4074 if (!delegate_) | 4070 if (!delegate_) |
4075 return; | 4071 return; |
4076 const gfx::Size new_size = GetPreferredSize(); | 4072 const gfx::Size new_size = GetPreferredSize(); |
4077 if (new_size != old_size) | 4073 if (new_size != old_size) |
4078 delegate_->UpdatePreferredSize(this, new_size); | 4074 delegate_->UpdatePreferredSize(this, new_size); |
4079 } | 4075 } |
4080 | 4076 |
4081 } // namespace content | 4077 } // namespace content |
OLD | NEW |