| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 bool user_gesture) override { | 116 bool user_gesture) override { |
| 117 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( | 117 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( |
| 118 new UI(webtest_, std::move(view), std::move(request)), nullptr, | 118 new UI(webtest_, std::move(view), std::move(request)), nullptr, |
| 119 initial_rect); | 119 initial_rect); |
| 120 window->Show(); | 120 window->Show(); |
| 121 webtest_->AddWindow(window); | 121 webtest_->AddWindow(window); |
| 122 } | 122 } |
| 123 void Close() override { | 123 void Close() override { |
| 124 GetWidget()->Close(); | 124 GetWidget()->Close(); |
| 125 } | 125 } |
| 126 void NavigationPending(navigation::mojom::NavigationEntryPtr entry) override { |
| 127 } |
| 128 void NavigationCommitted( |
| 129 navigation::mojom::NavigationCommittedDetailsPtr details, |
| 130 int current_index) override {} |
| 131 void NavigationEntryChanged(navigation::mojom::NavigationEntryPtr entry, |
| 132 int entry_index) override {} |
| 133 void NavigationListPruned(bool from_front, int count) override {} |
| 126 | 134 |
| 127 Webtest* webtest_; | 135 Webtest* webtest_; |
| 128 mus::Window* content_area_ = nullptr; | 136 mus::Window* content_area_ = nullptr; |
| 129 navigation::mojom::ViewPtr view_; | 137 navigation::mojom::ViewPtr view_; |
| 130 mojo::Binding<navigation::mojom::ViewClient> view_client_binding_; | 138 mojo::Binding<navigation::mojom::ViewClient> view_client_binding_; |
| 131 base::string16 current_title_; | 139 base::string16 current_title_; |
| 132 | 140 |
| 133 DISALLOW_COPY_AND_ASSIGN(UI); | 141 DISALLOW_COPY_AND_ASSIGN(UI); |
| 134 }; | 142 }; |
| 135 | 143 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 AddWindow(window); | 195 AddWindow(window); |
| 188 } | 196 } |
| 189 | 197 |
| 190 void Webtest::Create(shell::Connection* connection, | 198 void Webtest::Create(shell::Connection* connection, |
| 191 mojom::LaunchableRequest request) { | 199 mojom::LaunchableRequest request) { |
| 192 bindings_.AddBinding(this, std::move(request)); | 200 bindings_.AddBinding(this, std::move(request)); |
| 193 } | 201 } |
| 194 | 202 |
| 195 } // namespace webtest | 203 } // namespace webtest |
| 196 } // namespace mash | 204 } // namespace mash |
| OLD | NEW |