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

Side by Side Diff: services/ui/ws/test_utils.cc

Issue 2474113002: Mus+Ash: Unified BeginFrame Skeleton (Closed)
Patch Set: Remove window_tree.mojom.h 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
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 "services/ui/ws/test_utils.h" 5 #include "services/ui/ws/test_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 25 matching lines...) Expand all
36 is_primary_(is_primary), 36 is_primary_(is_primary),
37 cursor_storage_(cursor_storage) { 37 cursor_storage_(cursor_storage) {
38 display_metrics_.bounds = gfx::Rect(0, 0, 400, 300); 38 display_metrics_.bounds = gfx::Rect(0, 0, 400, 300);
39 display_metrics_.device_scale_factor = 1.f; 39 display_metrics_.device_scale_factor = 1.f;
40 } 40 }
41 ~TestPlatformDisplay() override {} 41 ~TestPlatformDisplay() override {}
42 42
43 // PlatformDisplay: 43 // PlatformDisplay:
44 void Init(PlatformDisplayDelegate* delegate) override {} 44 void Init(PlatformDisplayDelegate* delegate) override {}
45 int64_t GetId() const override { return id_; } 45 int64_t GetId() const override { return id_; }
46 void SchedulePaint(const ServerWindow* window,
47 const gfx::Rect& bounds) override {}
48 void SetViewportSize(const gfx::Size& size) override {} 46 void SetViewportSize(const gfx::Size& size) override {}
49 void SetTitle(const base::string16& title) override {} 47 void SetTitle(const base::string16& title) override {}
50 void SetCapture() override {} 48 void SetCapture() override {}
51 void ReleaseCapture() override {} 49 void ReleaseCapture() override {}
52 void SetCursorById(mojom::Cursor cursor) override { 50 void SetCursorById(mojom::Cursor cursor) override {
53 *cursor_storage_ = cursor; 51 *cursor_storage_ = cursor;
54 } 52 }
55 void UpdateTextInputState(const ui::TextInputState& state) override {} 53 void UpdateTextInputState(const ui::TextInputState& state) override {}
56 void SetImeVisibility(bool visible) override {} 54 void SetImeVisibility(bool visible) override {}
57 bool IsFramePending() const override { return false; }
58 gfx::Rect GetBounds() const override { return display_metrics_.bounds; } 55 gfx::Rect GetBounds() const override { return display_metrics_.bounds; }
59 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override { 56 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override {
60 if (display_metrics_ == metrics) 57 if (display_metrics_ == metrics)
61 return false; 58 return false;
62 display_metrics_ = metrics; 59 display_metrics_ = metrics;
63 return true; 60 return true;
64 } 61 }
65 const display::ViewportMetrics& GetViewportMetrics() const override { 62 const display::ViewportMetrics& GetViewportMetrics() const override {
66 return display_metrics_; 63 return display_metrics_;
67 } 64 }
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 return nullptr; 605 return nullptr;
609 if (!tree->AddWindow(parent_client_id, client_window_id)) 606 if (!tree->AddWindow(parent_client_id, client_window_id))
610 return nullptr; 607 return nullptr;
611 *client_id = client_window_id; 608 *client_id = client_window_id;
612 return tree->GetWindowByClientId(client_window_id); 609 return tree->GetWindowByClientId(client_window_id);
613 } 610 }
614 611
615 } // namespace test 612 } // namespace test
616 } // namespace ws 613 } // namespace ws
617 } // namespace ui 614 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698