OLD | NEW |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 content_area_ = window->window_tree()->NewWindow(nullptr); | 92 content_area_ = window->window_tree()->NewWindow(nullptr); |
93 window->AddChild(content_area_); | 93 window->AddChild(content_area_); |
94 | 94 |
95 mus::mojom::WindowTreeClientPtr client; | 95 mus::mojom::WindowTreeClientPtr client; |
96 view_->GetWindowTreeClient(GetProxy(&client)); | 96 view_->GetWindowTreeClient(GetProxy(&client)); |
97 content_area_->Embed(std::move(client)); | 97 content_area_->Embed(std::move(client)); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 // navigation::mojom::ViewClient: | 101 // navigation::mojom::ViewClient: |
| 102 void OpenURL(navigation::mojom::OpenURLParamsPtr params) override {} |
102 void LoadingStateChanged(bool is_loading) override {} | 103 void LoadingStateChanged(bool is_loading) override {} |
103 void NavigationStateChanged(const GURL& url, | 104 void NavigationStateChanged(const GURL& url, |
104 const mojo::String& title, | 105 const mojo::String& title, |
105 bool can_go_back, | 106 bool can_go_back, |
106 bool can_go_forward) override { | 107 bool can_go_forward) override { |
107 current_title_ = base::UTF8ToUTF16(title.get()); | 108 current_title_ = base::UTF8ToUTF16(title.get()); |
108 GetWidget()->UpdateWindowTitle(); | 109 GetWidget()->UpdateWindowTitle(); |
109 } | 110 } |
110 void LoadProgressChanged(double progress) override {} | 111 void LoadProgressChanged(double progress) override {} |
111 void UpdateHoverURL(const GURL& url) override {} | 112 void UpdateHoverURL(const GURL& url) override {} |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 AddWindow(window); | 196 AddWindow(window); |
196 } | 197 } |
197 | 198 |
198 void Webtest::Create(shell::Connection* connection, | 199 void Webtest::Create(shell::Connection* connection, |
199 mojom::LaunchableRequest request) { | 200 mojom::LaunchableRequest request) { |
200 bindings_.AddBinding(this, std::move(request)); | 201 bindings_.AddBinding(this, std::move(request)); |
201 } | 202 } |
202 | 203 |
203 } // namespace webtest | 204 } // namespace webtest |
204 } // namespace mash | 205 } // namespace mash |
OLD | NEW |