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

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

Issue 2161993002: Start using display.mojom.Display in mus+ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@display_traits
Patch Set: Fixes. Created 4 years, 5 months 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 | « services/ui/ws/test_utils.h ('k') | services/ui/ws/user_display_manager.h » ('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 "services/ui/ws/test_utils.h" 5 #include "services/ui/ws/test_utils.h"
6 6
7 #include <utility>
8
7 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
8 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
9 #include "services/shell/public/interfaces/connector.mojom.h" 11 #include "services/shell/public/interfaces/connector.mojom.h"
10 #include "services/ui/surfaces/surfaces_state.h" 12 #include "services/ui/surfaces/surfaces_state.h"
11 #include "services/ui/ws/display_binding.h" 13 #include "services/ui/ws/display_binding.h"
12 #include "services/ui/ws/display_manager.h" 14 #include "services/ui/ws/display_manager.h"
13 #include "services/ui/ws/platform_display_init_params.h" 15 #include "services/ui/ws/platform_display_init_params.h"
14 #include "services/ui/ws/server_window_surface_manager_test_api.h" 16 #include "services/ui/ws/server_window_surface_manager_test_api.h"
15 #include "services/ui/ws/window_manager_access_policy.h" 17 #include "services/ui/ws/window_manager_access_policy.h"
16 #include "services/ui/ws/window_manager_window_tree_factory.h" 18 #include "services/ui/ws/window_manager_window_tree_factory.h"
(...skipping 22 matching lines...) Expand all
39 // is created). 41 // is created).
40 delegate->OnViewportMetricsChanged(ViewportMetrics(), display_metrics_); 42 delegate->OnViewportMetricsChanged(ViewportMetrics(), display_metrics_);
41 } 43 }
42 void SchedulePaint(const ServerWindow* window, 44 void SchedulePaint(const ServerWindow* window,
43 const gfx::Rect& bounds) override {} 45 const gfx::Rect& bounds) override {}
44 void SetViewportSize(const gfx::Size& size) override {} 46 void SetViewportSize(const gfx::Size& size) override {}
45 void SetTitle(const base::string16& title) override {} 47 void SetTitle(const base::string16& title) override {}
46 void SetCapture() override {} 48 void SetCapture() override {}
47 void ReleaseCapture() override {} 49 void ReleaseCapture() override {}
48 void SetCursorById(int32_t cursor) override { *cursor_id_storage_ = cursor; } 50 void SetCursorById(int32_t cursor) override { *cursor_id_storage_ = cursor; }
49 mojom::Rotation GetRotation() override { return mojom::Rotation::VALUE_0; } 51 ::display::Display::Rotation GetRotation() override {
52 return ::display::Display::Rotation::ROTATE_0;
53 }
50 float GetDeviceScaleFactor() override { 54 float GetDeviceScaleFactor() override {
51 return display_metrics_.device_scale_factor; 55 return display_metrics_.device_scale_factor;
52 } 56 }
53 void UpdateTextInputState(const ui::TextInputState& state) override {} 57 void UpdateTextInputState(const ui::TextInputState& state) override {}
54 void SetImeVisibility(bool visible) override {} 58 void SetImeVisibility(bool visible) override {}
55 bool IsFramePending() const override { return false; } 59 bool IsFramePending() const override { return false; }
56 void RequestCopyOfOutput( 60 void RequestCopyOfOutput(
57 std::unique_ptr<cc::CopyOutputRequest> output_request) override {} 61 std::unique_ptr<cc::CopyOutputRequest> output_request) override {}
58 int64_t GetDisplayId() const override { return 1; } 62 int64_t GetDisplayId() const override { return 1; }
59 63
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 return nullptr; 522 return nullptr;
519 if (!tree->AddWindow(parent_client_id, client_window_id)) 523 if (!tree->AddWindow(parent_client_id, client_window_id))
520 return nullptr; 524 return nullptr;
521 *client_id = client_window_id; 525 *client_id = client_window_id;
522 return tree->GetWindowByClientId(client_window_id); 526 return tree->GetWindowByClientId(client_window_id);
523 } 527 }
524 528
525 } // namespace test 529 } // namespace test
526 } // namespace ws 530 } // namespace ws
527 } // namespace ui 531 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/user_display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698