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

Side by Side Diff: ui/aura/mus/window_tree_client.h

Issue 2741063002: Setup DiscardableMemory in the ash process (Closed)
Patch Set: Fix issues. Created 3 years, 9 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
OLDNEW
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 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ 5 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_H_
6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 12 matching lines...) Expand all
23 #include "services/ui/public/interfaces/window_tree.mojom.h" 23 #include "services/ui/public/interfaces/window_tree.mojom.h"
24 #include "ui/aura/aura_export.h" 24 #include "ui/aura/aura_export.h"
25 #include "ui/aura/client/transient_window_client_observer.h" 25 #include "ui/aura/client/transient_window_client_observer.h"
26 #include "ui/aura/mus/capture_synchronizer_delegate.h" 26 #include "ui/aura/mus/capture_synchronizer_delegate.h"
27 #include "ui/aura/mus/drag_drop_controller_host.h" 27 #include "ui/aura/mus/drag_drop_controller_host.h"
28 #include "ui/aura/mus/focus_synchronizer_delegate.h" 28 #include "ui/aura/mus/focus_synchronizer_delegate.h"
29 #include "ui/aura/mus/mus_types.h" 29 #include "ui/aura/mus/mus_types.h"
30 #include "ui/aura/mus/window_manager_delegate.h" 30 #include "ui/aura/mus/window_manager_delegate.h"
31 #include "ui/aura/mus/window_tree_host_mus_delegate.h" 31 #include "ui/aura/mus/window_tree_host_mus_delegate.h"
32 32
33 namespace base {
34 class Thread;
35 }
36
37 namespace discardable_memory {
38 class ClientDiscardableSharedMemoryManager;
39 }
40
33 namespace display { 41 namespace display {
34 class Display; 42 class Display;
35 } 43 }
36 44
37 namespace gfx { 45 namespace gfx {
38 class Insets; 46 class Insets;
39 } 47 }
40 48
41 namespace service_manager { 49 namespace service_manager {
42 class Connector; 50 class Connector;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 public DragDropControllerHost, 92 public DragDropControllerHost,
85 public WindowManagerClient, 93 public WindowManagerClient,
86 public WindowTreeHostMusDelegate, 94 public WindowTreeHostMusDelegate,
87 public client::TransientWindowClientObserver { 95 public client::TransientWindowClientObserver {
88 public: 96 public:
89 explicit WindowTreeClient( 97 explicit WindowTreeClient(
90 service_manager::Connector* connector, 98 service_manager::Connector* connector,
91 WindowTreeClientDelegate* delegate, 99 WindowTreeClientDelegate* delegate,
92 WindowManagerDelegate* window_manager_delegate = nullptr, 100 WindowManagerDelegate* window_manager_delegate = nullptr,
93 ui::mojom::WindowTreeClientRequest request = nullptr, 101 ui::mojom::WindowTreeClientRequest request = nullptr,
94 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr); 102 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr,
103 bool create_discardable_memory = true);
sky 2017/03/14 03:15:34 Document what create_discardable_memory means and
Peng 2017/03/14 15:03:14 Done.
95 ~WindowTreeClient() override; 104 ~WindowTreeClient() override;
96 105
97 // Establishes the connection by way of the WindowTreeFactory. 106 // Establishes the connection by way of the WindowTreeFactory.
98 void ConnectViaWindowTreeFactory(); 107 void ConnectViaWindowTreeFactory();
99 108
100 // Establishes the connection by way of WindowManagerWindowTreeFactory. 109 // Establishes the connection by way of WindowManagerWindowTreeFactory.
101 void ConnectAsWindowManager(); 110 void ConnectAsWindowManager();
102 111
103 service_manager::Connector* connector() { return connector_; } 112 service_manager::Connector* connector() { return connector_; }
104 ui::Gpu* gpu() { return gpu_.get(); } 113 ui::Gpu* gpu() { return gpu_.get(); }
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 base::Callback<void(bool)> on_current_move_finished_; 545 base::Callback<void(bool)> on_current_move_finished_;
537 546
538 // The current change id for the window manager. 547 // The current change id for the window manager.
539 uint32_t current_wm_move_loop_change_ = 0u; 548 uint32_t current_wm_move_loop_change_ = 0u;
540 Id current_wm_move_loop_window_id_ = 0u; 549 Id current_wm_move_loop_window_id_ = 0u;
541 550
542 std::unique_ptr<DragDropControllerMus> drag_drop_controller_; 551 std::unique_ptr<DragDropControllerMus> drag_drop_controller_;
543 552
544 base::ObserverList<WindowTreeClientTestObserver> test_observers_; 553 base::ObserverList<WindowTreeClientTestObserver> test_observers_;
545 554
555 // IO thread for GPU and discardable shared memory IPC.
556 std::unique_ptr<base::Thread> io_thread_;
557
546 std::unique_ptr<ui::Gpu> gpu_; 558 std::unique_ptr<ui::Gpu> gpu_;
547 std::unique_ptr<MusContextFactory> compositor_context_factory_; 559 std::unique_ptr<MusContextFactory> compositor_context_factory_;
548 560
561 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager>
562 discardable_shared_memory_manager_;
563
549 // If |compositor_context_factory_| is installed on Env, then this is the 564 // If |compositor_context_factory_| is installed on Env, then this is the
550 // ContextFactory that was set on Env originally. 565 // ContextFactory that was set on Env originally.
551 ui::ContextFactory* initial_context_factory_ = nullptr; 566 ui::ContextFactory* initial_context_factory_ = nullptr;
552 base::WeakPtrFactory<WindowTreeClient> weak_factory_; 567 base::WeakPtrFactory<WindowTreeClient> weak_factory_;
553 568
554 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); 569 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient);
555 }; 570 };
556 571
557 } // namespace aura 572 } // namespace aura
558 573
559 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ 574 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698