OLD | NEW |
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 #ifndef ASH_SHELL_PORT_H_ | 5 #ifndef ASH_SHELL_PORT_H_ |
6 #define ASH_SHELL_PORT_H_ | 6 #define ASH_SHELL_PORT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // different in classic ash and mus/mash. | 63 // different in classic ash and mus/mash. |
64 class ASH_EXPORT ShellPort { | 64 class ASH_EXPORT ShellPort { |
65 public: | 65 public: |
66 virtual ~ShellPort(); | 66 virtual ~ShellPort(); |
67 | 67 |
68 static ShellPort* Get(); | 68 static ShellPort* Get(); |
69 static bool HasInstance() { return instance_ != nullptr; } | 69 static bool HasInstance() { return instance_ != nullptr; } |
70 | 70 |
71 virtual void Shutdown(); | 71 virtual void Shutdown(); |
72 | 72 |
73 // Returns true when ash is running as a service_manager::Service. | |
74 // TODO(sky): remove and convert to GetAshConfig(). | |
75 virtual bool IsRunningInMash() const = 0; | |
76 virtual Config GetAshConfig() const = 0; | 73 virtual Config GetAshConfig() const = 0; |
77 | 74 |
78 // Convenience for GetPrimaryRootWindow()->GetRootWindowController(). | 75 // Convenience for GetPrimaryRootWindow()->GetRootWindowController(). |
79 RootWindowController* GetPrimaryRootWindowController(); | 76 RootWindowController* GetPrimaryRootWindowController(); |
80 | 77 |
81 virtual WmWindow* GetPrimaryRootWindow() = 0; | 78 virtual WmWindow* GetPrimaryRootWindow() = 0; |
82 | 79 |
83 // Returns the root window for the specified display. | 80 // Returns the root window for the specified display. |
84 virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0; | 81 virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0; |
85 | 82 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 static ShellPort* instance_; | 223 static ShellPort* instance_; |
227 | 224 |
228 base::ObserverList<LockStateObserver> lock_state_observers_; | 225 base::ObserverList<LockStateObserver> lock_state_observers_; |
229 | 226 |
230 bool simulate_modal_window_open_for_testing_ = false; | 227 bool simulate_modal_window_open_for_testing_ = false; |
231 }; | 228 }; |
232 | 229 |
233 } // namespace ash | 230 } // namespace ash |
234 | 231 |
235 #endif // ASH_SHELL_PORT_H_ | 232 #endif // ASH_SHELL_PORT_H_ |
OLD | NEW |