Skip to content

Commit

Permalink
Rename shell namespace to service_manager
Browse files Browse the repository at this point in the history
Presubmit skipped to avoid errors being triggered by things which
aren't actually changing here.

Strictly a rename CL.

BUG=None
R=ben@chromium.org
NOPRESUBMIT=True
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2420253002
Cr-Commit-Position: refs/heads/master@{#425570}
  • Loading branch information
krockot authored and Commit bot committed Oct 15, 2016
1 parent 0c1d68f commit 400ea35
Show file tree
Hide file tree
Showing 538 changed files with 2,191 additions and 2,013 deletions.
17 changes: 10 additions & 7 deletions ash/autoclick/mus/autoclick_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ AutoclickApplication::AutoclickApplication()

AutoclickApplication::~AutoclickApplication() {}

void AutoclickApplication::OnStart(const shell::Identity& identity) {
void AutoclickApplication::OnStart(const service_manager::Identity& identity) {
aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak"));
window_manager_connection_ =
views::WindowManagerConnection::Create(connector(), identity);
autoclick_controller_common_.reset(new AutoclickControllerCommon(
base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this));
}

bool AutoclickApplication::OnConnect(const shell::Identity& remote_identity,
shell::InterfaceRegistry* registry) {
bool AutoclickApplication::OnConnect(
const service_manager::Identity& remote_identity,
service_manager::InterfaceRegistry* registry) {
registry->AddInterface<mash::mojom::Launchable>(this);
registry->AddInterface<mojom::AutoclickController>(this);
return true;
Expand Down Expand Up @@ -125,14 +126,16 @@ void AutoclickApplication::SetAutoclickDelay(uint32_t delay_in_milliseconds) {
base::TimeDelta::FromMilliseconds(delay_in_milliseconds));
}

void AutoclickApplication::Create(const shell::Identity& remote_identity,
mash::mojom::LaunchableRequest request) {
void AutoclickApplication::Create(
const service_manager::Identity& remote_identity,
mash::mojom::LaunchableRequest request) {
launchable_binding_.Close();
launchable_binding_.Bind(std::move(request));
}

void AutoclickApplication::Create(const shell::Identity& remote_identity,
mojom::AutoclickControllerRequest request) {
void AutoclickApplication::Create(
const service_manager::Identity& remote_identity,
mojom::AutoclickControllerRequest request) {
autoclick_binding_.Close();
autoclick_binding_.Bind(std::move(request));
}
Expand Down
22 changes: 11 additions & 11 deletions ash/autoclick/mus/autoclick_application.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,34 @@ namespace ash {
namespace autoclick {

class AutoclickApplication
: public shell::Service,
: public service_manager::Service,
public mash::mojom::Launchable,
public mojom::AutoclickController,
public shell::InterfaceFactory<mash::mojom::Launchable>,
public shell::InterfaceFactory<mojom::AutoclickController>,
public service_manager::InterfaceFactory<mash::mojom::Launchable>,
public service_manager::InterfaceFactory<mojom::AutoclickController>,
public AutoclickControllerCommonDelegate {
public:
AutoclickApplication();
~AutoclickApplication() override;

private:
// shell::Service:
void OnStart(const shell::Identity& identity) override;
bool OnConnect(const shell::Identity& remote_identity,
shell::InterfaceRegistry* registry) override;
// service_manager::Service:
void OnStart(const service_manager::Identity& identity) override;
bool OnConnect(const service_manager::Identity& remote_identity,
service_manager::InterfaceRegistry* registry) override;

// mojom::Launchable:
void Launch(uint32_t what, mash::mojom::LaunchMode how) override;

// mojom::AutoclickController:
void SetAutoclickDelay(uint32_t delay_in_milliseconds) override;

// shell::InterfaceFactory<mojom::Launchable>:
void Create(const shell::Identity& remote_identity,
// service_manager::InterfaceFactory<mojom::Launchable>:
void Create(const service_manager::Identity& remote_identity,
mash::mojom::LaunchableRequest request) override;

// shell::InterfaceFactory<mojom::AutoclickController>:
void Create(const shell::Identity& remote_identity,
// service_manager::InterfaceFactory<mojom::AutoclickController>:
void Create(const service_manager::Identity& remote_identity,
mojom::AutoclickControllerRequest request) override;

// AutoclickControllerCommonDelegate:
Expand Down
3 changes: 2 additions & 1 deletion ash/autoclick/mus/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "services/service_manager/public/cpp/service_runner.h"

MojoResult ServiceMain(MojoHandle service_request_handle) {
shell::ServiceRunner runner(new ash::autoclick::AutoclickApplication);
service_manager::ServiceRunner runner(
new ash::autoclick::AutoclickApplication);
return runner.Run(service_request_handle);
}
2 changes: 1 addition & 1 deletion ash/common/mojo_interface_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) {
namespace mojo_interface_factory {

void RegisterInterfaces(
shell::InterfaceRegistry* registry,
service_manager::InterfaceRegistry* registry,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
registry->AddInterface(base::Bind(&BindShelfControllerRequestOnMainThread),
main_thread_task_runner);
Expand Down
4 changes: 2 additions & 2 deletions ash/common/mojo_interface_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace base {
class SingleThreadTaskRunner;
}

namespace shell {
namespace service_manager {
class InterfaceRegistry;
}

Expand All @@ -25,7 +25,7 @@ namespace mojo_interface_factory {
// (when running ash in-process in chrome) or on the main thread (when running
// in mash).
ASH_EXPORT void RegisterInterfaces(
shell::InterfaceRegistry* registry,
service_manager::InterfaceRegistry* registry,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner);

} // namespace mojo_interface_factory
Expand Down
10 changes: 5 additions & 5 deletions ash/common/shell_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ namespace keyboard {
class KeyboardUI;
}

namespace ui {
class MenuModel;
namespace service_manager {
class Connector;
}

namespace shell {
class Connector;
namespace ui {
class MenuModel;
}

namespace views {
Expand Down Expand Up @@ -62,7 +62,7 @@ class ASH_EXPORT ShellDelegate {
virtual ~ShellDelegate() {}

// Returns the connector for the mojo service manager. Returns null in tests.
virtual ::shell::Connector* GetShellConnector() const = 0;
virtual service_manager::Connector* GetShellConnector() const = 0;

// Returns true if this is the first time that the shell has been run after
// the system has booted. false is returned after the shell has been
Expand Down
3 changes: 2 additions & 1 deletion ash/common/system/tray/system_tray_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

namespace ash {

SystemTrayController::SystemTrayController(shell::Connector* connector)
SystemTrayController::SystemTrayController(
service_manager::Connector* connector)
: connector_(connector), hour_clock_type_(base::GetHourClockType()) {}

SystemTrayController::~SystemTrayController() {}
Expand Down
6 changes: 3 additions & 3 deletions ash/common/system/tray/system_tray_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "base/macros.h"
#include "mojo/public/cpp/bindings/binding_set.h"

namespace shell {
namespace service_manager {
class Connector;
}

Expand All @@ -34,7 +34,7 @@ namespace ash {
class ASH_EXPORT SystemTrayController
: NON_EXPORTED_BASE(public mojom::SystemTray) {
public:
explicit SystemTrayController(shell::Connector* connector);
explicit SystemTrayController(service_manager::Connector* connector);
~SystemTrayController() override;

base::HourClockType hour_clock_type() const { return hour_clock_type_; }
Expand Down Expand Up @@ -71,7 +71,7 @@ class ASH_EXPORT SystemTrayController
void SetUse24HourClock(bool use_24_hour) override;

// May be null in unit tests.
shell::Connector* connector_;
service_manager::Connector* connector_;

// Client interface in chrome browser. Only bound on Chrome OS.
mojom::SystemTrayClientPtr system_tray_client_;
Expand Down
4 changes: 2 additions & 2 deletions ash/common/wm_shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Insets;
class Point;
}

namespace shell {
namespace service_manager {
class Connector;
}

Expand Down Expand Up @@ -181,7 +181,7 @@ class ASH_EXPORT WmShell {
return window_selector_controller_.get();
}

// Returns true when ash is running as a shell::Service.
// Returns true when ash is running as a service_manager::Service.
virtual bool IsRunningInMash() const = 0;

virtual WmWindow* NewWindow(ui::wm::WindowType window_type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace ash {
namespace mus {

AcceleratorControllerDelegateMus::AcceleratorControllerDelegateMus(
shell::Connector* connector)
service_manager::Connector* connector)
: connector_(connector) {
#if !defined(OS_CHROMEOS)
// To avoid trybot complaining that |connector_| is not being
Expand Down
5 changes: 3 additions & 2 deletions ash/mus/accelerators/accelerator_controller_delegate_mus.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class WindowManager;

class AcceleratorControllerDelegateMus : public AcceleratorControllerDelegate {
public:
explicit AcceleratorControllerDelegateMus(shell::Connector* connector);
explicit AcceleratorControllerDelegateMus(
service_manager::Connector* connector);
~AcceleratorControllerDelegateMus() override;

// AcceleratorControllerDelegate:
Expand All @@ -32,7 +33,7 @@ class AcceleratorControllerDelegateMus : public AcceleratorControllerDelegate {
int new_shortcut_id) override;

private:
shell::Connector* connector_;
service_manager::Connector* connector_;

DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerDelegateMus);
};
Expand Down
5 changes: 3 additions & 2 deletions ash/mus/accelerators/accelerator_registrar_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ class TestAcceleratorHandler : public AcceleratorHandler {
DISALLOW_COPY_AND_ASSIGN(TestAcceleratorHandler);
};

class AcceleratorRegistrarTest : public shell::test::ServiceTest {
class AcceleratorRegistrarTest : public service_manager::test::ServiceTest {
public:
AcceleratorRegistrarTest() : shell::test::ServiceTest("exe:mash_unittests") {}
AcceleratorRegistrarTest()
: service_manager::test::ServiceTest("exe:mash_unittests") {}
~AcceleratorRegistrarTest() override {}

protected:
Expand Down
3 changes: 2 additions & 1 deletion ash/mus/accessibility_delegate_mus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

namespace ash {

AccessibilityDelegateMus::AccessibilityDelegateMus(shell::Connector* connector)
AccessibilityDelegateMus::AccessibilityDelegateMus(
service_manager::Connector* connector)
: connector_(connector) {}

AccessibilityDelegateMus::~AccessibilityDelegateMus() {}
Expand Down
6 changes: 3 additions & 3 deletions ash/mus/accessibility_delegate_mus.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
#include "base/macros.h"
#include "services/ui/public/interfaces/accessibility_manager.mojom.h"

namespace shell {
namespace service_manager {
class Connector;
}

namespace ash {

class AccessibilityDelegateMus : public DefaultAccessibilityDelegate {
public:
explicit AccessibilityDelegateMus(shell::Connector* connector);
explicit AccessibilityDelegateMus(service_manager::Connector* connector);
~AccessibilityDelegateMus() override;

private:
Expand All @@ -27,7 +27,7 @@ class AccessibilityDelegateMus : public DefaultAccessibilityDelegate {
void ToggleHighContrast() override;

ui::mojom::AccessibilityManagerPtr accessibility_manager_ptr_;
shell::Connector* connector_;
service_manager::Connector* connector_;

DISALLOW_COPY_AND_ASSIGN(AccessibilityDelegateMus);
};
Expand Down
2 changes: 1 addition & 1 deletion ash/mus/app_launch_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void RunCallback(bool* success, const base::Closure& callback, bool result) {
callback.Run();
}

class AppLaunchTest : public shell::test::ServiceTest {
class AppLaunchTest : public service_manager::test::ServiceTest {
public:
AppLaunchTest() : ServiceTest("exe:mash_unittests") {}
~AppLaunchTest() override {}
Expand Down
2 changes: 1 addition & 1 deletion ash/mus/app_list_presenter_mus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool HasConnection(app_list::mojom::AppListPresenterPtr* interface_ptr) {

} // namespace

AppListPresenterMus::AppListPresenterMus(::shell::Connector* connector)
AppListPresenterMus::AppListPresenterMus(service_manager::Connector* connector)
: connector_(connector) {}

AppListPresenterMus::~AppListPresenterMus() {}
Expand Down
6 changes: 3 additions & 3 deletions ash/mus/app_list_presenter_mus.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ui/app_list/presenter/app_list_presenter.h"
#include "ui/app_list/presenter/app_list_presenter.mojom.h"

namespace shell {
namespace service_manager {
class Connector;
}

Expand All @@ -19,7 +19,7 @@ namespace ash {
// talks to the app list service in chrome.
class AppListPresenterMus : public app_list::AppListPresenter {
public:
explicit AppListPresenterMus(::shell::Connector* connector);
explicit AppListPresenterMus(service_manager::Connector* connector);
~AppListPresenterMus() override;

// app_list::AppListPresenter:
Expand All @@ -34,7 +34,7 @@ class AppListPresenterMus : public app_list::AppListPresenter {
// been established or has an error.
void ConnectIfNeeded();

::shell::Connector* connector_;
service_manager::Connector* connector_;
app_list::mojom::AppListPresenterPtr presenter_;

DISALLOW_COPY_AND_ASSIGN(AppListPresenterMus);
Expand Down
4 changes: 0 additions & 4 deletions ash/mus/bridge/wm_shell_mus.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#include "base/observer_list.h"
#include "services/ui/public/cpp/window_tree_client_observer.h"

namespace shell {
class Connector;
}

namespace ui {
class WindowTreeClient;
}
Expand Down
4 changes: 2 additions & 2 deletions ash/mus/keyboard_ui_mus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace ash {

KeyboardUIMus::KeyboardUIMus(::shell::Connector* connector)
KeyboardUIMus::KeyboardUIMus(service_manager::Connector* connector)
: is_enabled_(false), observer_binding_(this) {
if (connector) {
// TODO(sky): should be something like mojo:keyboard, but need mapping.
Expand All @@ -23,7 +23,7 @@ KeyboardUIMus::~KeyboardUIMus() {}

// static
std::unique_ptr<KeyboardUI> KeyboardUIMus::Create(
::shell::Connector* connector) {
service_manager::Connector* connector) {
return base::MakeUnique<KeyboardUIMus>(connector);
}

Expand Down
7 changes: 4 additions & 3 deletions ash/mus/keyboard_ui_mus.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "mojo/public/cpp/bindings/binding.h"
#include "ui/keyboard/keyboard.mojom.h"

namespace shell {
namespace service_manager {
class Connector;
}

Expand All @@ -21,10 +21,11 @@ namespace ash {
class KeyboardUIMus : public KeyboardUI,
public keyboard::mojom::KeyboardObserver {
public:
explicit KeyboardUIMus(::shell::Connector* connector);
explicit KeyboardUIMus(service_manager::Connector* connector);
~KeyboardUIMus() override;

static std::unique_ptr<KeyboardUI> Create(::shell::Connector* connector);
static std::unique_ptr<KeyboardUI> Create(
service_manager::Connector* connector);

// KeyboardUI:
void Hide() override;
Expand Down
2 changes: 1 addition & 1 deletion ash/mus/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#include "services/service_manager/public/cpp/service_runner.h"

MojoResult ServiceMain(MojoHandle service_request_handle) {
shell::ServiceRunner runner(new ash::mus::WindowManagerApplication);
service_manager::ServiceRunner runner(new ash::mus::WindowManagerApplication);
return runner.Run(service_request_handle);
}
2 changes: 1 addition & 1 deletion ash/mus/root_window_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void RootWindowController::Shutdown() {
wm_root_window_controller_->CloseChildWindows();
}

shell::Connector* RootWindowController::GetConnector() {
service_manager::Connector* RootWindowController::GetConnector() {
return window_manager_->connector();
}

Expand Down
Loading

0 comments on commit 400ea35

Please sign in to comment.