OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "components/view_manager/client_connection.h" | 9 #include "components/view_manager/client_connection.h" |
10 #include "components/view_manager/connection_manager.h" | 10 #include "components/view_manager/connection_manager.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // ----------------------------------------------------------------------------- | 177 // ----------------------------------------------------------------------------- |
178 | 178 |
179 // Empty implementation of DisplayManager. | 179 // Empty implementation of DisplayManager. |
180 class TestDisplayManager : public DisplayManager { | 180 class TestDisplayManager : public DisplayManager { |
181 public: | 181 public: |
182 TestDisplayManager() {} | 182 TestDisplayManager() {} |
183 ~TestDisplayManager() override {} | 183 ~TestDisplayManager() override {} |
184 | 184 |
185 // DisplayManager: | 185 // DisplayManager: |
186 void Init(ConnectionManager* connection_manager, | 186 void Init(ConnectionManager* connection_manager, |
187 mojo::NativeViewportEventDispatcherPtr event_dispatcher) override {} | 187 EventDispatcher* event_dispatcher) override {} |
188 void SchedulePaint(const ServerView* view, const gfx::Rect& bounds) override { | 188 void SchedulePaint(const ServerView* view, const gfx::Rect& bounds) override { |
189 } | 189 } |
190 void SetViewportSize(const gfx::Size& size) override {} | 190 void SetViewportSize(const gfx::Size& size) override {} |
191 const mojo::ViewportMetrics& GetViewportMetrics() override { | 191 const mojo::ViewportMetrics& GetViewportMetrics() override { |
192 return display_metrices_; | 192 return display_metrices_; |
193 } | 193 } |
194 | 194 |
195 private: | 195 private: |
196 mojo::ViewportMetrics display_metrices_; | 196 mojo::ViewportMetrics display_metrices_; |
197 | 197 |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 EXPECT_EQ(connection_manager()->root(), | 549 EXPECT_EQ(connection_manager()->root(), |
550 connection_manager()->GetFocusedView()); | 550 connection_manager()->GetFocusedView()); |
551 ASSERT_EQ(wm_client()->tracker()->changes()->size(), 1u); | 551 ASSERT_EQ(wm_client()->tracker()->changes()->size(), 1u); |
552 EXPECT_EQ("InputEvent view=0,1 event_action=4", | 552 EXPECT_EQ("InputEvent view=0,1 event_action=4", |
553 ChangesToDescription1(*wm_client()->tracker()->changes())[0]); | 553 ChangesToDescription1(*wm_client()->tracker()->changes())[0]); |
554 EXPECT_TRUE(connection1_client->tracker()->changes()->empty()); | 554 EXPECT_TRUE(connection1_client->tracker()->changes()->empty()); |
555 ; | 555 ; |
556 } | 556 } |
557 | 557 |
558 } // namespace view_manager | 558 } // namespace view_manager |
OLD | NEW |