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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "content/browser/webui/web_ui_impl.h" | 50 #include "content/browser/webui/web_ui_impl.h" |
51 #include "content/common/browser_plugin/browser_plugin_constants.h" | 51 #include "content/common/browser_plugin/browser_plugin_constants.h" |
52 #include "content/common/browser_plugin/browser_plugin_messages.h" | 52 #include "content/common/browser_plugin/browser_plugin_messages.h" |
53 #include "content/common/frame_messages.h" | 53 #include "content/common/frame_messages.h" |
54 #include "content/common/image_messages.h" | 54 #include "content/common/image_messages.h" |
55 #include "content/common/input_messages.h" | 55 #include "content/common/input_messages.h" |
56 #include "content/common/ssl_status_serialization.h" | 56 #include "content/common/ssl_status_serialization.h" |
57 #include "content/common/view_messages.h" | 57 #include "content/common/view_messages.h" |
58 #include "content/public/browser/ax_event_notification_details.h" | 58 #include "content/public/browser/ax_event_notification_details.h" |
59 #include "content/public/browser/browser_context.h" | 59 #include "content/public/browser/browser_context.h" |
60 #include "content/public/browser/browser_plugin_guest_manager_delegate.h" | 60 #include "content/public/browser/browser_plugin_guest_manager.h" |
61 #include "content/public/browser/content_browser_client.h" | 61 #include "content/public/browser/content_browser_client.h" |
62 #include "content/public/browser/devtools_agent_host.h" | 62 #include "content/public/browser/devtools_agent_host.h" |
63 #include "content/public/browser/download_manager.h" | 63 #include "content/public/browser/download_manager.h" |
64 #include "content/public/browser/download_url_parameters.h" | 64 #include "content/public/browser/download_url_parameters.h" |
65 #include "content/public/browser/invalidate_type.h" | 65 #include "content/public/browser/invalidate_type.h" |
66 #include "content/public/browser/javascript_dialog_manager.h" | 66 #include "content/public/browser/javascript_dialog_manager.h" |
67 #include "content/public/browser/load_from_memory_cache_details.h" | 67 #include "content/public/browser/load_from_memory_cache_details.h" |
68 #include "content/public/browser/load_notification_details.h" | 68 #include "content/public/browser/load_notification_details.h" |
69 #include "content/public/browser/navigation_details.h" | 69 #include "content/public/browser/navigation_details.h" |
70 #include "content/public/browser/notification_details.h" | 70 #include "content/public/browser/notification_details.h" |
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 CreateParams create_params(GetBrowserContext(), site_instance.get()); | 1407 CreateParams create_params(GetBrowserContext(), site_instance.get()); |
1408 create_params.routing_id = route_id; | 1408 create_params.routing_id = route_id; |
1409 create_params.main_frame_routing_id = main_frame_route_id; | 1409 create_params.main_frame_routing_id = main_frame_route_id; |
1410 if (!is_guest) { | 1410 if (!is_guest) { |
1411 create_params.context = view_->GetNativeView(); | 1411 create_params.context = view_->GetNativeView(); |
1412 create_params.initial_size = GetContainerBounds().size(); | 1412 create_params.initial_size = GetContainerBounds().size(); |
1413 } else { | 1413 } else { |
1414 // This makes |new_contents| act as a guest. | 1414 // This makes |new_contents| act as a guest. |
1415 // For more info, see comment above class BrowserPluginGuest. | 1415 // For more info, see comment above class BrowserPluginGuest. |
1416 int instance_id = | 1416 int instance_id = |
1417 GetBrowserContext()->GetGuestManagerDelegate()->GetNextInstanceID(); | 1417 GetBrowserContext()->GetGuestManager()->GetNextInstanceID(); |
1418 WebContentsImpl* new_contents_impl = | 1418 WebContentsImpl* new_contents_impl = |
1419 static_cast<WebContentsImpl*>(new_contents); | 1419 static_cast<WebContentsImpl*>(new_contents); |
1420 BrowserPluginGuest::CreateWithOpener(instance_id, | 1420 BrowserPluginGuest::CreateWithOpener(instance_id, |
1421 new_contents_impl->opener() != NULL, | 1421 new_contents_impl->opener() != NULL, |
1422 new_contents_impl, | 1422 new_contents_impl, |
1423 GetBrowserPluginGuest()); | 1423 GetBrowserPluginGuest()); |
1424 } | 1424 } |
1425 if (params.disposition == NEW_BACKGROUND_TAB) | 1425 if (params.disposition == NEW_BACKGROUND_TAB) |
1426 create_params.initially_hidden = true; | 1426 create_params.initially_hidden = true; |
1427 new_contents->Init(create_params); | 1427 new_contents->Init(create_params); |
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3961 | 3961 |
3962 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3962 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3963 if (!delegate_) | 3963 if (!delegate_) |
3964 return; | 3964 return; |
3965 const gfx::Size new_size = GetPreferredSize(); | 3965 const gfx::Size new_size = GetPreferredSize(); |
3966 if (new_size != old_size) | 3966 if (new_size != old_size) |
3967 delegate_->UpdatePreferredSize(this, new_size); | 3967 delegate_->UpdatePreferredSize(this, new_size); |
3968 } | 3968 } |
3969 | 3969 |
3970 } // namespace content | 3970 } // namespace content |
OLD | NEW |