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

Side by Side Diff: chrome/browser/ui/ash/ash_util.cc

Issue 2718043002: Replace more hardcoded "ash" strings with ash::mojom::kServiceName (Closed)
Patch Set: Remove ash_util includes that are no longer needed. 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 (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 #include "chrome/browser/ui/ash/ash_util.h" 5 #include "chrome/browser/ui/ash/ash_util.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/mojo_interface_factory.h" 8 #include "ash/common/mojo_interface_factory.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 private: 43 private:
44 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 44 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
45 service_manager::InterfaceRegistry interfaces_; 45 service_manager::InterfaceRegistry interfaces_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(EmbeddedAshService); 47 DISALLOW_COPY_AND_ASSIGN(EmbeddedAshService);
48 }; 48 };
49 49
50 } // namespace 50 } // namespace
51 51
52 // TODO(rockot): Remove this.
53 const char* GetAshServiceName() {
54 return "ash";
55 }
56
57 std::unique_ptr<service_manager::Service> CreateEmbeddedAshService( 52 std::unique_ptr<service_manager::Service> CreateEmbeddedAshService(
58 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { 53 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
59 return base::MakeUnique<EmbeddedAshService>(task_runner); 54 return base::MakeUnique<EmbeddedAshService>(task_runner);
60 } 55 }
61 56
62 } // namespace ash_util 57 } // namespace ash_util
63 58
64 namespace chrome { 59 namespace chrome {
65 60
66 bool ShouldOpenAshOnStartup() { 61 bool ShouldOpenAshOnStartup() {
67 return !IsRunningInMash(); 62 return !IsRunningInMash();
68 } 63 }
69 64
70 bool IsRunningInMash() { 65 bool IsRunningInMash() {
71 return service_manager::ServiceManagerIsRemote(); 66 return service_manager::ServiceManagerIsRemote();
72 } 67 }
73 68
74 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) { 69 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) {
75 // When running in mash the browser doesn't handle ash accelerators. 70 // When running in mash the browser doesn't handle ash accelerators.
76 if (chrome::IsRunningInMash()) 71 if (chrome::IsRunningInMash())
77 return false; 72 return false;
78 73
79 return ash::WmShell::Get()->accelerator_controller()->IsDeprecated( 74 return ash::WmShell::Get()->accelerator_controller()->IsDeprecated(
80 accelerator); 75 accelerator);
81 } 76 }
82 77
83 } // namespace chrome 78 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_util.h ('k') | chrome/browser/ui/ash/cast_config_client_media_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698