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 15 matching lines...) Expand all Loading... |
26 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 26 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
27 #include "content/browser/download/download_stats.h" | 27 #include "content/browser/download/download_stats.h" |
28 #include "content/browser/download/mhtml_generation_manager.h" | 28 #include "content/browser/download/mhtml_generation_manager.h" |
29 #include "content/browser/download/save_package.h" | 29 #include "content/browser/download/save_package.h" |
30 #include "content/browser/frame_host/cross_process_frame_connector.h" | 30 #include "content/browser/frame_host/cross_process_frame_connector.h" |
31 #include "content/browser/frame_host/interstitial_page_impl.h" | 31 #include "content/browser/frame_host/interstitial_page_impl.h" |
32 #include "content/browser/frame_host/navigation_entry_impl.h" | 32 #include "content/browser/frame_host/navigation_entry_impl.h" |
33 #include "content/browser/frame_host/navigator_impl.h" | 33 #include "content/browser/frame_host/navigator_impl.h" |
34 #include "content/browser/frame_host/render_frame_host_impl.h" | 34 #include "content/browser/frame_host/render_frame_host_impl.h" |
35 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 35 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 36 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
36 #include "content/browser/host_zoom_map_impl.h" | 37 #include "content/browser/host_zoom_map_impl.h" |
37 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 38 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
38 #include "content/browser/message_port_message_filter.h" | 39 #include "content/browser/message_port_message_filter.h" |
39 #include "content/browser/message_port_service.h" | 40 #include "content/browser/message_port_service.h" |
40 #include "content/browser/power_save_blocker_impl.h" | 41 #include "content/browser/power_save_blocker_impl.h" |
41 #include "content/browser/renderer_host/render_process_host_impl.h" | 42 #include "content/browser/renderer_host/render_process_host_impl.h" |
42 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 43 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
43 #include "content/browser/renderer_host/render_view_host_impl.h" | 44 #include "content/browser/renderer_host/render_view_host_impl.h" |
44 #include "content/browser/renderer_host/render_widget_host_impl.h" | 45 #include "content/browser/renderer_host/render_widget_host_impl.h" |
45 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 46 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 gfx::Size initial_size = params.initial_size; | 1081 gfx::Size initial_size = params.initial_size; |
1081 view_->CreateView(initial_size, params.context); | 1082 view_->CreateView(initial_size, params.context); |
1082 | 1083 |
1083 // Listen for whether our opener gets destroyed. | 1084 // Listen for whether our opener gets destroyed. |
1084 if (opener_) | 1085 if (opener_) |
1085 AddDestructionObserver(opener_); | 1086 AddDestructionObserver(opener_); |
1086 | 1087 |
1087 registrar_.Add(this, | 1088 registrar_.Add(this, |
1088 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1089 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
1089 NotificationService::AllBrowserContextsAndSources()); | 1090 NotificationService::AllBrowserContextsAndSources()); |
| 1091 |
| 1092 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
| 1093 |
1090 #if defined(OS_ANDROID) | 1094 #if defined(OS_ANDROID) |
1091 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1095 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
1092 #endif | 1096 #endif |
1093 } | 1097 } |
1094 | 1098 |
1095 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1099 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
1096 RemoveDestructionObserver(web_contents); | 1100 RemoveDestructionObserver(web_contents); |
1097 | 1101 |
1098 // Clear the opener if it has been closed. | 1102 // Clear the opener if it has been closed. |
1099 if (web_contents == opener_) { | 1103 if (web_contents == opener_) { |
(...skipping 2861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3961 | 3965 |
3962 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3966 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3963 if (!delegate_) | 3967 if (!delegate_) |
3964 return; | 3968 return; |
3965 const gfx::Size new_size = GetPreferredSize(); | 3969 const gfx::Size new_size = GetPreferredSize(); |
3966 if (new_size != old_size) | 3970 if (new_size != old_size) |
3967 delegate_->UpdatePreferredSize(this, new_size); | 3971 delegate_->UpdatePreferredSize(this, new_size); |
3968 } | 3972 } |
3969 | 3973 |
3970 } // namespace content | 3974 } // namespace content |
OLD | NEW |