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 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 int32_t view_routing_id = params.routing_id; | 1360 int32_t view_routing_id = params.routing_id; |
1361 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; | 1361 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; |
1362 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { | 1362 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { |
1363 view_routing_id = main_frame_widget_routing_id = | 1363 view_routing_id = main_frame_widget_routing_id = |
1364 site_instance->GetProcess()->GetNextRoutingID(); | 1364 site_instance->GetProcess()->GetNextRoutingID(); |
1365 } | 1365 } |
1366 | 1366 |
1367 GetRenderManager()->Init(site_instance.get(), view_routing_id, | 1367 GetRenderManager()->Init(site_instance.get(), view_routing_id, |
1368 params.main_frame_routing_id, | 1368 params.main_frame_routing_id, |
1369 main_frame_widget_routing_id); | 1369 main_frame_widget_routing_id); |
1370 frame_tree_.root()->SetFrameName(params.main_frame_name); | 1370 |
| 1371 // blink::FrameTree::setName uses |name| as the |unique_name| for the main |
| 1372 // frame - let's do the same thing here. |
| 1373 std::string unique_name = params.main_frame_name; |
| 1374 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); |
1371 | 1375 |
1372 WebContentsViewDelegate* delegate = | 1376 WebContentsViewDelegate* delegate = |
1373 GetContentClient()->browser()->GetWebContentsViewDelegate(this); | 1377 GetContentClient()->browser()->GetWebContentsViewDelegate(this); |
1374 | 1378 |
1375 #if defined(MOJO_SHELL_CLIENT) | 1379 #if defined(MOJO_SHELL_CLIENT) |
1376 if (MojoShellConnection::Get() && | 1380 if (MojoShellConnection::Get() && |
1377 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1381 base::CommandLine::ForCurrentProcess()->HasSwitch( |
1378 switches::kUseMusInRenderer)) { | 1382 switches::kUseMusInRenderer)) { |
1379 mus::Window* mus_window = aura::GetMusWindow(params.context); | 1383 mus::Window* mus_window = aura::GetMusWindow(params.context); |
1380 if (mus_window) { | 1384 if (mus_window) { |
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4786 const WebContentsObserver::MediaPlayerId& id) { | 4790 const WebContentsObserver::MediaPlayerId& id) { |
4787 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4791 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
4788 } | 4792 } |
4789 | 4793 |
4790 void WebContentsImpl::MediaStoppedPlaying( | 4794 void WebContentsImpl::MediaStoppedPlaying( |
4791 const WebContentsObserver::MediaPlayerId& id) { | 4795 const WebContentsObserver::MediaPlayerId& id) { |
4792 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4796 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
4793 } | 4797 } |
4794 | 4798 |
4795 } // namespace content | 4799 } // namespace content |
OLD | NEW |