| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 #include "content/browser/android/java_interfaces_impl.h" | 145 #include "content/browser/android/java_interfaces_impl.h" |
| 146 #include "content/browser/media/android/media_web_contents_observer_android.h" | 146 #include "content/browser/media/android/media_web_contents_observer_android.h" |
| 147 #include "content/browser/web_contents/web_contents_android.h" | 147 #include "content/browser/web_contents/web_contents_android.h" |
| 148 #endif // OS_ANDROID | 148 #endif // OS_ANDROID |
| 149 | 149 |
| 150 #if defined(OS_MACOSX) | 150 #if defined(OS_MACOSX) |
| 151 #include "base/mac/foundation_util.h" | 151 #include "base/mac/foundation_util.h" |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 #if defined(USE_AURA) | 154 #if defined(USE_AURA) |
| 155 #include "content/browser/web_contents/web_contents_view_mus.h" | |
| 156 #include "content/public/common/service_manager_connection.h" | 155 #include "content/public/common/service_manager_connection.h" |
| 157 #include "ui/aura/mus/mus_util.h" | 156 #include "ui/aura/mus/mus_util.h" |
| 158 #endif | 157 #endif |
| 159 | 158 |
| 160 #if BUILDFLAG(ENABLE_PLUGINS) | 159 #if BUILDFLAG(ENABLE_PLUGINS) |
| 161 #include "content/browser/media/session/pepper_playback_observer.h" | 160 #include "content/browser/media/session/pepper_playback_observer.h" |
| 162 #endif // ENABLE_PLUGINS | 161 #endif // ENABLE_PLUGINS |
| 163 | 162 |
| 164 namespace content { | 163 namespace content { |
| 165 namespace { | 164 namespace { |
| (...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 params.renderer_initiated_creation); | 1561 params.renderer_initiated_creation); |
| 1563 | 1562 |
| 1564 // blink::FrameTree::setName always keeps |unique_name| empty in case of a | 1563 // blink::FrameTree::setName always keeps |unique_name| empty in case of a |
| 1565 // main frame - let's do the same thing here. | 1564 // main frame - let's do the same thing here. |
| 1566 std::string unique_name; | 1565 std::string unique_name; |
| 1567 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); | 1566 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); |
| 1568 | 1567 |
| 1569 WebContentsViewDelegate* delegate = | 1568 WebContentsViewDelegate* delegate = |
| 1570 GetContentClient()->browser()->GetWebContentsViewDelegate(this); | 1569 GetContentClient()->browser()->GetWebContentsViewDelegate(this); |
| 1571 | 1570 |
| 1572 #if defined(USE_AURA) | 1571 if (GuestMode::IsCrossProcessFrameGuest(this)) { |
| 1573 if (ServiceManagerConnection::GetForProcess() && | 1572 view_.reset(new WebContentsViewChildFrame( |
| 1574 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1573 this, delegate, &render_view_host_delegate_view_)); |
| 1575 switches::kUseMusInRenderer)) { | 1574 } else { |
| 1576 ui::Window* mus_window = aura::GetMusWindow(params.context); | 1575 view_.reset(CreateWebContentsView(this, delegate, |
| 1577 if (mus_window) { | 1576 &render_view_host_delegate_view_)); |
| 1578 view_.reset(new WebContentsViewMus(mus_window, this, delegate, | |
| 1579 &render_view_host_delegate_view_)); | |
| 1580 } | |
| 1581 } | |
| 1582 #endif | |
| 1583 | |
| 1584 if (!view_) { | |
| 1585 if (GuestMode::IsCrossProcessFrameGuest(this)) { | |
| 1586 view_.reset(new WebContentsViewChildFrame( | |
| 1587 this, delegate, &render_view_host_delegate_view_)); | |
| 1588 } else { | |
| 1589 view_.reset(CreateWebContentsView(this, delegate, | |
| 1590 &render_view_host_delegate_view_)); | |
| 1591 } | |
| 1592 } | 1577 } |
| 1593 | 1578 |
| 1594 if (browser_plugin_guest_ && !GuestMode::IsCrossProcessFrameGuest(this)) { | 1579 if (browser_plugin_guest_ && !GuestMode::IsCrossProcessFrameGuest(this)) { |
| 1595 view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(), | 1580 view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(), |
| 1596 std::move(view_), | 1581 std::move(view_), |
| 1597 &render_view_host_delegate_view_)); | 1582 &render_view_host_delegate_view_)); |
| 1598 } | 1583 } |
| 1599 CHECK(render_view_host_delegate_view_); | 1584 CHECK(render_view_host_delegate_view_); |
| 1600 CHECK(view_.get()); | 1585 CHECK(view_.get()); |
| 1601 | 1586 |
| (...skipping 3717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5319 GetMainFrame()->AddMessageToConsole( | 5304 GetMainFrame()->AddMessageToConsole( |
| 5320 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5305 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5321 base::StringPrintf("This site does not have a valid SSL " | 5306 base::StringPrintf("This site does not have a valid SSL " |
| 5322 "certificate! Without SSL, your site's and " | 5307 "certificate! Without SSL, your site's and " |
| 5323 "visitors' data is vulnerable to theft and " | 5308 "visitors' data is vulnerable to theft and " |
| 5324 "tampering. Get a valid SSL certificate before" | 5309 "tampering. Get a valid SSL certificate before" |
| 5325 " releasing your website to the public.")); | 5310 " releasing your website to the public.")); |
| 5326 } | 5311 } |
| 5327 | 5312 |
| 5328 } // namespace content | 5313 } // namespace content |
| OLD | NEW |