Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_ASH_ASH_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_ASH_UTIL_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_ASH_UTIL_H_ | 6 #define CHROME_BROWSER_UI_ASH_ASH_UTIL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 | 12 |
| 13 namespace service_manager { | 13 namespace service_manager { |
| 14 class Service; | 14 class Service; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 class Accelerator; | 18 class Accelerator; |
| 19 } // namespace ui | 19 } // namespace ui |
| 20 | 20 |
| 21 namespace ash_util { | 21 namespace ash_util { |
|
sky
2017/02/28 17:40:26
Generally we don't use namespaces like this in chr
James Cook
2017/02/28 17:47:25
I think we use namespaces like this where there is
| |
| 22 | 22 |
| 23 // Creates an in-process Service instance of which can host common ash | 23 // Creates an in-process Service instance of which can host common ash |
| 24 // interfaces. | 24 // interfaces. |
| 25 std::unique_ptr<service_manager::Service> CreateEmbeddedAshService( | 25 std::unique_ptr<service_manager::Service> CreateEmbeddedAshService( |
| 26 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 26 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 27 | 27 |
| 28 } // namespace ash_util | |
| 29 | |
| 30 // TODO(jamescook): Change this namespace to ash_util. | |
| 31 namespace chrome { | |
| 32 | |
| 33 // Returns true if Ash should be run at startup. | 28 // Returns true if Ash should be run at startup. |
| 34 bool ShouldOpenAshOnStartup(); | 29 bool ShouldOpenAshOnStartup(); |
| 35 | 30 |
| 36 // Returns true if Chrome is running in the mash shell. | 31 // Returns true if Chrome is running in the mash shell. |
| 37 bool IsRunningInMash(); | 32 bool IsRunningInMash(); |
| 38 | 33 |
| 39 // Returns true if the given |accelerator| has been deprecated and hence can | 34 // Returns true if the given |accelerator| has been deprecated and hence can |
| 40 // be consumed by web contents if needed. | 35 // be consumed by web contents if needed. |
| 41 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator); | 36 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator); |
| 42 | 37 |
| 43 } // namespace chrome | 38 } // namespace ash_util |
| 44 | 39 |
| 45 #endif // CHROME_BROWSER_UI_ASH_ASH_UTIL_H_ | 40 #endif // CHROME_BROWSER_UI_ASH_ASH_UTIL_H_ |
| OLD | NEW |