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

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

Issue 2281583003: services/ui: Split GpuServiceInternal into gpu vs. ws pieces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DONE_2016.08.24_mus-ws-gpu-refactor
Patch Set: tot merge Created 4 years, 3 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/platform_display.cc ('k') | services/ui/ws/window_server.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> 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"
11 #include "gpu/ipc/client/gpu_channel_host.h"
11 #include "services/shell/public/interfaces/connector.mojom.h" 12 #include "services/shell/public/interfaces/connector.mojom.h"
12 #include "services/ui/surfaces/surfaces_state.h" 13 #include "services/ui/surfaces/surfaces_state.h"
13 #include "services/ui/ws/display_binding.h" 14 #include "services/ui/ws/display_binding.h"
14 #include "services/ui/ws/display_manager.h" 15 #include "services/ui/ws/display_manager.h"
15 #include "services/ui/ws/platform_display_init_params.h" 16 #include "services/ui/ws/platform_display_init_params.h"
16 #include "services/ui/ws/server_window_surface_manager_test_api.h" 17 #include "services/ui/ws/server_window_surface_manager_test_api.h"
17 #include "services/ui/ws/window_manager_access_policy.h" 18 #include "services/ui/ws/window_manager_access_policy.h"
18 #include "services/ui/ws/window_manager_window_tree_factory.h" 19 #include "services/ui/ws/window_manager_window_tree_factory.h"
19 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
20 21
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 float GetDeviceScaleFactor() override { 60 float GetDeviceScaleFactor() override {
60 return display_metrics_.device_scale_factor; 61 return display_metrics_.device_scale_factor;
61 } 62 }
62 void UpdateTextInputState(const ui::TextInputState& state) override {} 63 void UpdateTextInputState(const ui::TextInputState& state) override {}
63 void SetImeVisibility(bool visible) override {} 64 void SetImeVisibility(bool visible) override {}
64 bool IsFramePending() const override { return false; } 65 bool IsFramePending() const override { return false; }
65 void RequestCopyOfOutput( 66 void RequestCopyOfOutput(
66 std::unique_ptr<cc::CopyOutputRequest> output_request) override {} 67 std::unique_ptr<cc::CopyOutputRequest> output_request) override {}
67 gfx::Rect GetBounds() const override { return display_metrics_.bounds; } 68 gfx::Rect GetBounds() const override { return display_metrics_.bounds; }
68 bool IsPrimaryDisplay() const override { return is_primary_; } 69 bool IsPrimaryDisplay() const override { return is_primary_; }
70 void OnGpuChannelEstablished(
71 scoped_refptr<gpu::GpuChannelHost> host) override {}
69 72
70 private: 73 private:
71 ViewportMetrics display_metrics_; 74 ViewportMetrics display_metrics_;
72 75
73 int64_t id_; 76 int64_t id_;
74 bool is_primary_; 77 bool is_primary_;
75 int32_t* cursor_id_storage_; 78 int32_t* cursor_id_storage_;
76 79
77 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplay); 80 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplay);
78 }; 81 };
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 return nullptr; 544 return nullptr;
542 if (!tree->AddWindow(parent_client_id, client_window_id)) 545 if (!tree->AddWindow(parent_client_id, client_window_id))
543 return nullptr; 546 return nullptr;
544 *client_id = client_window_id; 547 *client_id = client_window_id;
545 return tree->GetWindowByClientId(client_window_id); 548 return tree->GetWindowByClientId(client_window_id);
546 } 549 }
547 550
548 } // namespace test 551 } // namespace test
549 } // namespace ws 552 } // namespace ws
550 } // namespace ui 553 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/platform_display.cc ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698