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

Side by Side Diff: components/web_view/public/cpp/web_view.cc

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 months 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
« no previous file with comments | « components/web_view/public/cpp/BUILD.gn ('k') | components/web_view/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/web_view/public/cpp/web_view.h" 5 #include "components/web_view/public/cpp/web_view.h"
6 6
7 #include "components/view_manager/public/cpp/view.h" 7 #include "components/mus/public/cpp/view.h"
8 #include "mojo/application/public/cpp/application_impl.h" 8 #include "mojo/application/public/cpp/application_impl.h"
9 9
10 namespace web_view { 10 namespace web_view {
11 11
12 WebView::WebView(mojom::WebViewClient* client) : binding_(client) {} 12 WebView::WebView(mojom::WebViewClient* client) : binding_(client) {}
13 WebView::~WebView() {} 13 WebView::~WebView() {}
14 14
15 void WebView::Init(mojo::ApplicationImpl* app, mojo::View* view) { 15 void WebView::Init(mojo::ApplicationImpl* app, mojo::View* view) {
16 view->SetAccessPolicy(mojo::ViewTree::ACCESS_POLICY_EMBED_ROOT); 16 view->SetAccessPolicy(mojo::ViewTree::ACCESS_POLICY_EMBED_ROOT);
17 17
18 mojo::URLRequestPtr request(mojo::URLRequest::New()); 18 mojo::URLRequestPtr request(mojo::URLRequest::New());
19 request->url = "mojo:web_view"; 19 request->url = "mojo:web_view";
20 20
21 mojom::WebViewClientPtr client; 21 mojom::WebViewClientPtr client;
22 mojo::InterfaceRequest<mojom::WebViewClient> client_request = 22 mojo::InterfaceRequest<mojom::WebViewClient> client_request =
23 GetProxy(&client); 23 GetProxy(&client);
24 binding_.Bind(client_request.Pass()); 24 binding_.Bind(client_request.Pass());
25 25
26 mojom::WebViewFactoryPtr factory; 26 mojom::WebViewFactoryPtr factory;
27 app->ConnectToService(request.Pass(), &factory); 27 app->ConnectToService(request.Pass(), &factory);
28 factory->CreateWebView(client.Pass(), GetProxy(&web_view_)); 28 factory->CreateWebView(client.Pass(), GetProxy(&web_view_));
29 29
30 mojo::ViewTreeClientPtr view_tree_client; 30 mojo::ViewTreeClientPtr view_tree_client;
31 web_view_->GetViewTreeClient(GetProxy(&view_tree_client)); 31 web_view_->GetViewTreeClient(GetProxy(&view_tree_client));
32 view->Embed(view_tree_client.Pass()); 32 view->Embed(view_tree_client.Pass());
33 } 33 }
34 34
35 } // namespace web_view 35 } // namespace web_view
OLDNEW
« no previous file with comments | « components/web_view/public/cpp/BUILD.gn ('k') | components/web_view/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698