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

Side by Side Diff: mash/webtest/webtest.cc

Issue 2493693003: Mojo C++ bindings: switch services/navigation mojom target to use STL types. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | services/navigation/navigation_unittest.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mash/webtest/webtest.h" 5 #include "mash/webtest/webtest.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 ui::mojom::WindowTreeClientPtr client; 96 ui::mojom::WindowTreeClientPtr client;
97 view_->GetWindowTreeClient(GetProxy(&client)); 97 view_->GetWindowTreeClient(GetProxy(&client));
98 content_area_->Embed(std::move(client)); 98 content_area_->Embed(std::move(client));
99 } 99 }
100 } 100 }
101 101
102 // navigation::mojom::ViewClient: 102 // navigation::mojom::ViewClient:
103 void OpenURL(navigation::mojom::OpenURLParamsPtr params) override {} 103 void OpenURL(navigation::mojom::OpenURLParamsPtr params) override {}
104 void LoadingStateChanged(bool is_loading) override {} 104 void LoadingStateChanged(bool is_loading) override {}
105 void NavigationStateChanged(const GURL& url, 105 void NavigationStateChanged(const GURL& url,
106 const mojo::String& title, 106 const std::string& title,
107 bool can_go_back, 107 bool can_go_back,
108 bool can_go_forward) override { 108 bool can_go_forward) override {
109 current_title_ = base::UTF8ToUTF16(title.get()); 109 current_title_ = base::UTF8ToUTF16(title);
110 GetWidget()->UpdateWindowTitle(); 110 GetWidget()->UpdateWindowTitle();
111 } 111 }
112 void LoadProgressChanged(double progress) override {} 112 void LoadProgressChanged(double progress) override {}
113 void UpdateHoverURL(const GURL& url) override {} 113 void UpdateHoverURL(const GURL& url) override {}
114 void ViewCreated(navigation::mojom::ViewPtr view, 114 void ViewCreated(navigation::mojom::ViewPtr view,
115 navigation::mojom::ViewClientRequest request, 115 navigation::mojom::ViewClientRequest request,
116 bool is_popup, 116 bool is_popup,
117 const gfx::Rect& initial_rect, 117 const gfx::Rect& initial_rect,
118 bool user_gesture) override { 118 bool user_gesture) override {
119 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( 119 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds(
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 AddWindow(window); 197 AddWindow(window);
198 } 198 }
199 199
200 void Webtest::Create(const service_manager::Identity& remote_identity, 200 void Webtest::Create(const service_manager::Identity& remote_identity,
201 mojom::LaunchableRequest request) { 201 mojom::LaunchableRequest request) {
202 bindings_.AddBinding(this, std::move(request)); 202 bindings_.AddBinding(this, std::move(request));
203 } 203 }
204 204
205 } // namespace webtest 205 } // namespace webtest
206 } // namespace mash 206 } // namespace mash
OLDNEW
« no previous file with comments | « no previous file | services/navigation/navigation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698