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

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

Issue 2577023003: Removes WebContentsViewMus/RenderWidgetHostViewMus (Closed)
Patch Set: fix test Created 4 years 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 <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
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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 params.renderer_initiated_creation); 1548 params.renderer_initiated_creation);
1550 1549
1551 // blink::FrameTree::setName always keeps |unique_name| empty in case of a 1550 // blink::FrameTree::setName always keeps |unique_name| empty in case of a
1552 // main frame - let's do the same thing here. 1551 // main frame - let's do the same thing here.
1553 std::string unique_name; 1552 std::string unique_name;
1554 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); 1553 frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
1555 1554
1556 WebContentsViewDelegate* delegate = 1555 WebContentsViewDelegate* delegate =
1557 GetContentClient()->browser()->GetWebContentsViewDelegate(this); 1556 GetContentClient()->browser()->GetWebContentsViewDelegate(this);
1558 1557
1559 #if defined(USE_AURA) 1558 if (GuestMode::IsCrossProcessFrameGuest(this)) {
1560 if (ServiceManagerConnection::GetForProcess() && 1559 view_.reset(new WebContentsViewChildFrame(
1561 base::CommandLine::ForCurrentProcess()->HasSwitch( 1560 this, delegate, &render_view_host_delegate_view_));
1562 switches::kUseMusInRenderer)) { 1561 } else {
1563 ui::Window* mus_window = aura::GetMusWindow(params.context); 1562 view_.reset(CreateWebContentsView(this, delegate,
1564 if (mus_window) { 1563 &render_view_host_delegate_view_));
1565 view_.reset(new WebContentsViewMus(mus_window, this, delegate,
1566 &render_view_host_delegate_view_));
1567 }
1568 }
1569 #endif
1570
1571 if (!view_) {
1572 if (GuestMode::IsCrossProcessFrameGuest(this)) {
1573 view_.reset(new WebContentsViewChildFrame(
1574 this, delegate, &render_view_host_delegate_view_));
1575 } else {
1576 view_.reset(CreateWebContentsView(this, delegate,
1577 &render_view_host_delegate_view_));
1578 }
1579 } 1564 }
1580 1565
1581 if (browser_plugin_guest_ && !GuestMode::IsCrossProcessFrameGuest(this)) { 1566 if (browser_plugin_guest_ && !GuestMode::IsCrossProcessFrameGuest(this)) {
1582 view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(), 1567 view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(),
1583 std::move(view_), 1568 std::move(view_),
1584 &render_view_host_delegate_view_)); 1569 &render_view_host_delegate_view_));
1585 } 1570 }
1586 CHECK(render_view_host_delegate_view_); 1571 CHECK(render_view_host_delegate_view_);
1587 CHECK(view_.get()); 1572 CHECK(view_.get());
1588 1573
(...skipping 3758 matching lines...) Expand 10 before | Expand all | Expand 10 after
5347 GetMainFrame()->AddMessageToConsole( 5332 GetMainFrame()->AddMessageToConsole(
5348 content::CONSOLE_MESSAGE_LEVEL_WARNING, 5333 content::CONSOLE_MESSAGE_LEVEL_WARNING,
5349 base::StringPrintf("This site does not have a valid SSL " 5334 base::StringPrintf("This site does not have a valid SSL "
5350 "certificate! Without SSL, your site's and " 5335 "certificate! Without SSL, your site's and "
5351 "visitors' data is vulnerable to theft and " 5336 "visitors' data is vulnerable to theft and "
5352 "tampering. Get a valid SSL certificate before" 5337 "tampering. Get a valid SSL certificate before"
5353 " releasing your website to the public.")); 5338 " releasing your website to the public."));
5354 } 5339 }
5355 5340
5356 } // namespace content 5341 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mus.cc ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698