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 16 matching lines...) Expand all Loading... |
27 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 27 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
28 #include "content/browser/download/download_stats.h" | 28 #include "content/browser/download/download_stats.h" |
29 #include "content/browser/download/mhtml_generation_manager.h" | 29 #include "content/browser/download/mhtml_generation_manager.h" |
30 #include "content/browser/download/save_package.h" | 30 #include "content/browser/download/save_package.h" |
31 #include "content/browser/frame_host/cross_process_frame_connector.h" | 31 #include "content/browser/frame_host/cross_process_frame_connector.h" |
32 #include "content/browser/frame_host/interstitial_page_impl.h" | 32 #include "content/browser/frame_host/interstitial_page_impl.h" |
33 #include "content/browser/frame_host/navigation_entry_impl.h" | 33 #include "content/browser/frame_host/navigation_entry_impl.h" |
34 #include "content/browser/frame_host/navigator_impl.h" | 34 #include "content/browser/frame_host/navigator_impl.h" |
35 #include "content/browser/frame_host/render_frame_host_impl.h" | 35 #include "content/browser/frame_host/render_frame_host_impl.h" |
36 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 36 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 37 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
37 #include "content/browser/host_zoom_map_impl.h" | 38 #include "content/browser/host_zoom_map_impl.h" |
38 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 39 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
39 #include "content/browser/message_port_message_filter.h" | 40 #include "content/browser/message_port_message_filter.h" |
40 #include "content/browser/message_port_service.h" | 41 #include "content/browser/message_port_service.h" |
41 #include "content/browser/power_save_blocker_impl.h" | 42 #include "content/browser/power_save_blocker_impl.h" |
42 #include "content/browser/renderer_host/render_process_host_impl.h" | 43 #include "content/browser/renderer_host/render_process_host_impl.h" |
43 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 44 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
44 #include "content/browser/renderer_host/render_view_host_impl.h" | 45 #include "content/browser/renderer_host/render_view_host_impl.h" |
45 #include "content/browser/renderer_host/render_widget_host_impl.h" | 46 #include "content/browser/renderer_host/render_widget_host_impl.h" |
46 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 47 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 gfx::Size initial_size = params.initial_size; | 1089 gfx::Size initial_size = params.initial_size; |
1089 view_->CreateView(initial_size, params.context); | 1090 view_->CreateView(initial_size, params.context); |
1090 | 1091 |
1091 // Listen for whether our opener gets destroyed. | 1092 // Listen for whether our opener gets destroyed. |
1092 if (opener_) | 1093 if (opener_) |
1093 AddDestructionObserver(opener_); | 1094 AddDestructionObserver(opener_); |
1094 | 1095 |
1095 registrar_.Add(this, | 1096 registrar_.Add(this, |
1096 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1097 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
1097 NotificationService::AllBrowserContextsAndSources()); | 1098 NotificationService::AllBrowserContextsAndSources()); |
| 1099 |
| 1100 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
| 1101 |
1098 #if defined(OS_ANDROID) | 1102 #if defined(OS_ANDROID) |
1099 java_bridge_dispatcher_host_manager_.reset( | 1103 java_bridge_dispatcher_host_manager_.reset( |
1100 new JavaBridgeDispatcherHostManager(this)); | 1104 new JavaBridgeDispatcherHostManager(this)); |
1101 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1105 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
1102 #endif | 1106 #endif |
1103 } | 1107 } |
1104 | 1108 |
1105 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1109 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
1106 RemoveDestructionObserver(web_contents); | 1110 RemoveDestructionObserver(web_contents); |
1107 | 1111 |
(...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3970 | 3974 |
3971 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3975 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3972 if (!delegate_) | 3976 if (!delegate_) |
3973 return; | 3977 return; |
3974 const gfx::Size new_size = GetPreferredSize(); | 3978 const gfx::Size new_size = GetPreferredSize(); |
3975 if (new_size != old_size) | 3979 if (new_size != old_size) |
3976 delegate_->UpdatePreferredSize(this, new_size); | 3980 delegate_->UpdatePreferredSize(this, new_size); |
3977 } | 3981 } |
3978 | 3982 |
3979 } // namespace content | 3983 } // namespace content |
OLD | NEW |