| 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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 gfx::Size initial_size = params.initial_size; | 1094 gfx::Size initial_size = params.initial_size; |
| 1094 view_->CreateView(initial_size, params.context); | 1095 view_->CreateView(initial_size, params.context); |
| 1095 | 1096 |
| 1096 // Listen for whether our opener gets destroyed. | 1097 // Listen for whether our opener gets destroyed. |
| 1097 if (opener_) | 1098 if (opener_) |
| 1098 AddDestructionObserver(opener_); | 1099 AddDestructionObserver(opener_); |
| 1099 | 1100 |
| 1100 registrar_.Add(this, | 1101 registrar_.Add(this, |
| 1101 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1102 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
| 1102 NotificationService::AllBrowserContextsAndSources()); | 1103 NotificationService::AllBrowserContextsAndSources()); |
| 1104 |
| 1105 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
| 1106 |
| 1103 #if defined(OS_ANDROID) | 1107 #if defined(OS_ANDROID) |
| 1104 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1108 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
| 1105 #endif | 1109 #endif |
| 1106 } | 1110 } |
| 1107 | 1111 |
| 1108 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1112 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
| 1109 RemoveDestructionObserver(web_contents); | 1113 RemoveDestructionObserver(web_contents); |
| 1110 | 1114 |
| 1111 // Clear the opener if it has been closed. | 1115 // Clear the opener if it has been closed. |
| 1112 if (web_contents == opener_) { | 1116 if (web_contents == opener_) { |
| (...skipping 2861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3974 | 3978 |
| 3975 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3979 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3976 if (!delegate_) | 3980 if (!delegate_) |
| 3977 return; | 3981 return; |
| 3978 const gfx::Size new_size = GetPreferredSize(); | 3982 const gfx::Size new_size = GetPreferredSize(); |
| 3979 if (new_size != old_size) | 3983 if (new_size != old_size) |
| 3980 delegate_->UpdatePreferredSize(this, new_size); | 3984 delegate_->UpdatePreferredSize(this, new_size); |
| 3981 } | 3985 } |
| 3982 | 3986 |
| 3983 } // namespace content | 3987 } // namespace content |
| OLD | NEW |