| 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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 int32_t view_routing_id = params.routing_id; | 1373 int32_t view_routing_id = params.routing_id; |
| 1374 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; | 1374 int32_t main_frame_widget_routing_id = params.main_frame_widget_routing_id; |
| 1375 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { | 1375 if (main_frame_widget_routing_id == MSG_ROUTING_NONE) { |
| 1376 view_routing_id = main_frame_widget_routing_id = | 1376 view_routing_id = main_frame_widget_routing_id = |
| 1377 site_instance->GetProcess()->GetNextRoutingID(); | 1377 site_instance->GetProcess()->GetNextRoutingID(); |
| 1378 } | 1378 } |
| 1379 | 1379 |
| 1380 GetRenderManager()->Init(site_instance.get(), view_routing_id, | 1380 GetRenderManager()->Init(site_instance.get(), view_routing_id, |
| 1381 params.main_frame_routing_id, | 1381 params.main_frame_routing_id, |
| 1382 main_frame_widget_routing_id); | 1382 main_frame_widget_routing_id); |
| 1383 frame_tree_.root()->SetFrameName(params.main_frame_name); | 1383 |
| 1384 // blink::FrameTree::setName uses |name| as the |unique_name| for the main |
| 1385 // frame - let's do the same thing here. |
| 1386 std::string unique_name = params.main_frame_name; |
| 1387 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); |
| 1384 | 1388 |
| 1385 WebContentsViewDelegate* delegate = | 1389 WebContentsViewDelegate* delegate = |
| 1386 GetContentClient()->browser()->GetWebContentsViewDelegate(this); | 1390 GetContentClient()->browser()->GetWebContentsViewDelegate(this); |
| 1387 | 1391 |
| 1388 #if defined(MOJO_SHELL_CLIENT) | 1392 #if defined(MOJO_SHELL_CLIENT) |
| 1389 if (MojoShellConnection::Get() && | 1393 if (MojoShellConnection::Get() && |
| 1390 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1394 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1391 switches::kUseMusInRenderer)) { | 1395 switches::kUseMusInRenderer)) { |
| 1392 mus::Window* mus_window = aura::GetMusWindow(params.context); | 1396 mus::Window* mus_window = aura::GetMusWindow(params.context); |
| 1393 if (mus_window) { | 1397 if (mus_window) { |
| (...skipping 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4752 const WebContentsObserver::MediaPlayerId& id) { | 4756 const WebContentsObserver::MediaPlayerId& id) { |
| 4753 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4757 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4754 } | 4758 } |
| 4755 | 4759 |
| 4756 void WebContentsImpl::MediaStoppedPlaying( | 4760 void WebContentsImpl::MediaStoppedPlaying( |
| 4757 const WebContentsObserver::MediaPlayerId& id) { | 4761 const WebContentsObserver::MediaPlayerId& id) { |
| 4758 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4762 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4759 } | 4763 } |
| 4760 | 4764 |
| 4761 } // namespace content | 4765 } // namespace content |
| OLD | NEW |