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

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

Issue 261363002: Rename BrowserPluginGuestManagerDelegate to BrowserPluginGuestManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_cleanupguestmanager
Patch Set: Addressed nits 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"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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 GetBrowserContext()->GetGuestManagerDelegate()->GetNextInstanceID(); 1420 GetBrowserContext()->GetGuestManager()->GetNextInstanceID();
1421 WebContentsImpl* new_contents_impl = 1421 WebContentsImpl* new_contents_impl =
1422 static_cast<WebContentsImpl*>(new_contents); 1422 static_cast<WebContentsImpl*>(new_contents);
1423 BrowserPluginGuest::CreateWithOpener(instance_id, 1423 BrowserPluginGuest::CreateWithOpener(instance_id,
1424 new_contents_impl->opener() != NULL, 1424 new_contents_impl->opener() != NULL,
1425 new_contents_impl, 1425 new_contents_impl,
1426 GetBrowserPluginGuest()); 1426 GetBrowserPluginGuest());
1427 } 1427 }
1428 if (params.disposition == NEW_BACKGROUND_TAB) 1428 if (params.disposition == NEW_BACKGROUND_TAB)
1429 create_params.initially_hidden = true; 1429 create_params.initially_hidden = true;
1430 new_contents->Init(create_params); 1430 new_contents->Init(create_params);
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
3969 3969
3970 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 3970 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
3971 if (!delegate_) 3971 if (!delegate_)
3972 return; 3972 return;
3973 const gfx::Size new_size = GetPreferredSize(); 3973 const gfx::Size new_size = GetPreferredSize();
3974 if (new_size != old_size) 3974 if (new_size != old_size)
3975 delegate_->UpdatePreferredSize(this, new_size); 3975 delegate_->UpdatePreferredSize(this, new_size);
3976 } 3976 }
3977 3977
3978 } // namespace content 3978 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698