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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1531 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; | 1531 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; |
1532 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { | 1532 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { |
1533 view_routing_id = main_frame_widget_routing_id = | 1533 view_routing_id = main_frame_widget_routing_id = |
1534 site_instance->GetProcess()->GetNextRoutingID(); | 1534 site_instance->GetProcess()->GetNextRoutingID(); |
1535 } | 1535 } |
1536 | 1536 |
1537 GetRenderManager()->Init(site_instance.get(), view_routing_id, | 1537 GetRenderManager()->Init(site_instance.get(), view_routing_id, |
1538 params.main_frame_routing_id, | 1538 params.main_frame_routing_id, |
1539 main_frame_widget_routing_id); | 1539 main_frame_widget_routing_id); |
1540 | 1540 |
1541 // blink::FrameTree::setName uses |name| as the |unique_name| for the main | 1541 // blink::FrameTree::setName always keeps |unique_name| empty in case of a |
1542 // frame - let's do the same thing here. | 1542 // main frame - let's do the same thing here. |
1543 std::string unique_name = params.main_frame_name; | 1543 std::string unique_name; |
1544 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); | 1544 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); |
1545 | 1545 |
1546 WebContentsViewDelegate* delegate = | 1546 WebContentsViewDelegate* delegate = |
1547 GetContentClient()->browser()->GetWebContentsViewDelegate(this); | 1547 GetContentClient()->browser()->GetWebContentsViewDelegate(this); |
1548 | 1548 |
1549 #if defined(USE_AURA) | 1549 #if defined(USE_AURA) |
1550 if (MojoShellConnection::GetForProcess() && | 1550 if (MojoShellConnection::GetForProcess() && |
1551 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1551 base::CommandLine::ForCurrentProcess()->HasSwitch( |
1552 switches::kUseMusInRenderer)) { | 1552 switches::kUseMusInRenderer)) { |
1553 ui::Window* mus_window = aura::GetMusWindow(params.context); | 1553 ui::Window* mus_window = aura::GetMusWindow(params.context); |
(...skipping 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5205 for (RenderViewHost* render_view_host : render_view_host_set) | 5205 for (RenderViewHost* render_view_host : render_view_host_set) |
5206 render_view_host->OnWebkitPreferencesChanged(); | 5206 render_view_host->OnWebkitPreferencesChanged(); |
5207 } | 5207 } |
5208 | 5208 |
5209 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5209 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5210 JavaScriptDialogManager* dialog_manager) { | 5210 JavaScriptDialogManager* dialog_manager) { |
5211 dialog_manager_ = dialog_manager; | 5211 dialog_manager_ = dialog_manager; |
5212 } | 5212 } |
5213 | 5213 |
5214 } // namespace content | 5214 } // namespace content |
OLD | NEW |