Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 269113002: Remove BrowserPluginGuestManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_createguest
Patch Set: Updateed Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/metrics/stats_counters.h" 14 #include "base/metrics/stats_counters.h"
15 #include "base/process/process.h" 15 #include "base/process/process.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "base/time/time.h" 20 #include "base/time/time.h"
21 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 21 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
22 #include "content/browser/browser_plugin/browser_plugin_guest.h" 22 #include "content/browser/browser_plugin/browser_plugin_guest.h"
23 #include "content/browser/browser_plugin/browser_plugin_guest_manager.h"
24 #include "content/browser/child_process_security_policy_impl.h" 23 #include "content/browser/child_process_security_policy_impl.h"
25 #include "content/browser/devtools/render_view_devtools_agent_host.h" 24 #include "content/browser/devtools/render_view_devtools_agent_host.h"
26 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 25 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
27 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 26 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
28 #include "content/browser/download/download_stats.h" 27 #include "content/browser/download/download_stats.h"
29 #include "content/browser/download/mhtml_generation_manager.h" 28 #include "content/browser/download/mhtml_generation_manager.h"
30 #include "content/browser/download/save_package.h" 29 #include "content/browser/download/save_package.h"
31 #include "content/browser/frame_host/cross_process_frame_connector.h" 30 #include "content/browser/frame_host/cross_process_frame_connector.h"
32 #include "content/browser/frame_host/interstitial_page_impl.h" 31 #include "content/browser/frame_host/interstitial_page_impl.h"
33 #include "content/browser/frame_host/navigation_entry_impl.h" 32 #include "content/browser/frame_host/navigation_entry_impl.h"
(...skipping 17 matching lines...) Expand all
51 #include "content/browser/webui/web_ui_impl.h" 50 #include "content/browser/webui/web_ui_impl.h"
52 #include "content/common/browser_plugin/browser_plugin_constants.h" 51 #include "content/common/browser_plugin/browser_plugin_constants.h"
53 #include "content/common/browser_plugin/browser_plugin_messages.h" 52 #include "content/common/browser_plugin/browser_plugin_messages.h"
54 #include "content/common/frame_messages.h" 53 #include "content/common/frame_messages.h"
55 #include "content/common/image_messages.h" 54 #include "content/common/image_messages.h"
56 #include "content/common/input_messages.h" 55 #include "content/common/input_messages.h"
57 #include "content/common/ssl_status_serialization.h" 56 #include "content/common/ssl_status_serialization.h"
58 #include "content/common/view_messages.h" 57 #include "content/common/view_messages.h"
59 #include "content/public/browser/ax_event_notification_details.h" 58 #include "content/public/browser/ax_event_notification_details.h"
60 #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"
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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 CreateParams create_params(GetBrowserContext(), site_instance.get()); 1410 CreateParams create_params(GetBrowserContext(), site_instance.get());
1411 create_params.routing_id = route_id; 1411 create_params.routing_id = route_id;
1412 create_params.main_frame_routing_id = main_frame_route_id; 1412 create_params.main_frame_routing_id = main_frame_route_id;
1413 if (!is_guest) { 1413 if (!is_guest) {
1414 create_params.context = view_->GetNativeView(); 1414 create_params.context = view_->GetNativeView();
1415 create_params.initial_size = GetContainerBounds().size(); 1415 create_params.initial_size = GetContainerBounds().size();
1416 } else { 1416 } else {
1417 // This makes |new_contents| act as a guest. 1417 // This makes |new_contents| act as a guest.
1418 // For more info, see comment above class BrowserPluginGuest. 1418 // For more info, see comment above class BrowserPluginGuest.
1419 int instance_id = 1419 int instance_id =
1420 BrowserPluginGuestManager::FromBrowserContext(GetBrowserContext())-> 1420 GetBrowserContext()->GetGuestManagerDelegate()->GetNextInstanceID();
1421 GetNextInstanceID();
1422 WebContentsImpl* new_contents_impl = 1421 WebContentsImpl* new_contents_impl =
1423 static_cast<WebContentsImpl*>(new_contents); 1422 static_cast<WebContentsImpl*>(new_contents);
1424 BrowserPluginGuest::CreateWithOpener(instance_id, 1423 BrowserPluginGuest::CreateWithOpener(instance_id,
1425 new_contents_impl->opener() != NULL, 1424 new_contents_impl->opener() != NULL,
1426 new_contents_impl, 1425 new_contents_impl,
1427 GetBrowserPluginGuest()); 1426 GetBrowserPluginGuest());
1428 } 1427 }
1429 if (params.disposition == NEW_BACKGROUND_TAB) 1428 if (params.disposition == NEW_BACKGROUND_TAB)
1430 create_params.initially_hidden = true; 1429 create_params.initially_hidden = true;
1431 new_contents->Init(create_params); 1430 new_contents->Init(create_params);
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 3969
3971 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 3970 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
3972 if (!delegate_) 3971 if (!delegate_)
3973 return; 3972 return;
3974 const gfx::Size new_size = GetPreferredSize(); 3973 const gfx::Size new_size = GetPreferredSize();
3975 if (new_size != old_size) 3974 if (new_size != old_size)
3976 delegate_->UpdatePreferredSize(this, new_size); 3975 delegate_->UpdatePreferredSize(this, new_size);
3977 } 3976 }
3978 3977
3979 } // namespace content 3978 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/test_guest_manager_delegate.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698