Index: mash/task_viewer/task_viewer.cc |
diff --git a/mash/task_viewer/task_viewer.cc b/mash/task_viewer/task_viewer.cc |
index 36d87de08124f9d76d818fc53fe848593cd57c64..229fd91263d0ac58a1898a1ee23690d0b016f978 100644 |
--- a/mash/task_viewer/task_viewer.cc |
+++ b/mash/task_viewer/task_viewer.cc |
@@ -34,16 +34,18 @@ namespace mash { |
namespace task_viewer { |
namespace { |
-using shell::mojom::ServiceInfoPtr; |
+using service_manager::mojom::ServiceInfoPtr; |
-class TaskViewerContents : public views::WidgetDelegateView, |
- public ui::TableModel, |
- public views::ButtonListener, |
- public shell::mojom::ServiceManagerListener { |
+class TaskViewerContents |
+ : public views::WidgetDelegateView, |
+ public ui::TableModel, |
+ public views::ButtonListener, |
+ public service_manager::mojom::ServiceManagerListener { |
public: |
- TaskViewerContents(TaskViewer* task_viewer, |
- shell::mojom::ServiceManagerListenerRequest request, |
- catalog::mojom::CatalogPtr catalog) |
+ TaskViewerContents( |
+ TaskViewer* task_viewer, |
+ service_manager::mojom::ServiceManagerListenerRequest request, |
+ catalog::mojom::CatalogPtr catalog) |
: task_viewer_(task_viewer), |
binding_(this, std::move(request)), |
catalog_(std::move(catalog)), |
@@ -74,9 +76,9 @@ class TaskViewerContents : public views::WidgetDelegateView, |
private: |
struct InstanceInfo { |
- InstanceInfo(const shell::Identity& identity, base::ProcessId pid) |
+ InstanceInfo(const service_manager::Identity& identity, base::ProcessId pid) |
: identity(identity), pid(pid) {} |
- shell::Identity identity; |
+ service_manager::Identity identity; |
uint32_t pid; |
std::string display_name; |
}; |
@@ -147,14 +149,14 @@ class TaskViewerContents : public views::WidgetDelegateView, |
process.Terminate(9, true); |
} |
- // Overridden from shell::mojom::ServiceManagerListener: |
+ // Overridden from service_manager::mojom::ServiceManagerListener: |
void OnInit(std::vector<ServiceInfoPtr> instances) override { |
// This callback should only be called with an empty model. |
DCHECK(instances_.empty()); |
std::vector<std::string> names; |
names.reserve(instances.size()); |
for (size_t i = 0; i < instances.size(); ++i) { |
- const shell::Identity& identity = instances[i]->identity; |
+ const service_manager::Identity& identity = instances[i]->identity; |
InsertInstance(identity, instances[i]->pid); |
names.push_back(identity.name()); |
} |
@@ -163,7 +165,7 @@ class TaskViewerContents : public views::WidgetDelegateView, |
weak_ptr_factory_.GetWeakPtr())); |
} |
void OnServiceCreated(ServiceInfoPtr instance) override { |
- shell::Identity identity = instance->identity; |
+ service_manager::Identity identity = instance->identity; |
DCHECK(!ContainsIdentity(identity)); |
InsertInstance(identity, instance->pid); |
observer_->OnItemsAdded(static_cast<int>(instances_.size()), 1); |
@@ -173,7 +175,7 @@ class TaskViewerContents : public views::WidgetDelegateView, |
base::Bind(&TaskViewerContents::OnGotCatalogEntries, |
weak_ptr_factory_.GetWeakPtr())); |
} |
- void OnServiceStarted(const shell::Identity& identity, |
+ void OnServiceStarted(const service_manager::Identity& identity, |
uint32_t pid) override { |
for (auto it = instances_.begin(); it != instances_.end(); ++it) { |
if ((*it)->identity == identity) { |
@@ -184,7 +186,7 @@ class TaskViewerContents : public views::WidgetDelegateView, |
} |
} |
} |
- void OnServiceStopped(const shell::Identity& identity) override { |
+ void OnServiceStopped(const service_manager::Identity& identity) override { |
for (auto it = instances_.begin(); it != instances_.end(); ++it) { |
if ((*it)->identity == identity) { |
observer_->OnItemsRemoved( |
@@ -196,7 +198,7 @@ class TaskViewerContents : public views::WidgetDelegateView, |
NOTREACHED(); |
} |
- bool ContainsIdentity(const shell::Identity& identity) const { |
+ bool ContainsIdentity(const service_manager::Identity& identity) const { |
for (auto& it : instances_) { |
if (it->identity == identity) |
return true; |
@@ -204,7 +206,7 @@ class TaskViewerContents : public views::WidgetDelegateView, |
return false; |
} |
- void InsertInstance(const shell::Identity& identity, uint32_t pid) { |
+ void InsertInstance(const service_manager::Identity& identity, uint32_t pid) { |
instances_.push_back(base::MakeUnique<InstanceInfo>(identity, pid)); |
} |
@@ -254,7 +256,7 @@ class TaskViewerContents : public views::WidgetDelegateView, |
} |
TaskViewer* task_viewer_; |
- mojo::Binding<shell::mojom::ServiceManagerListener> binding_; |
+ mojo::Binding<service_manager::mojom::ServiceManagerListener> binding_; |
catalog::mojom::CatalogPtr catalog_; |
views::TableView* table_view_; |
@@ -282,7 +284,7 @@ void TaskViewer::RemoveWindow(views::Widget* widget) { |
base::MessageLoop::current()->QuitWhenIdle(); |
} |
-void TaskViewer::OnStart(const shell::Identity& identity) { |
+void TaskViewer::OnStart(const service_manager::Identity& identity) { |
tracing_.Initialize(connector(), identity.name()); |
aura_init_.reset( |
@@ -291,8 +293,8 @@ void TaskViewer::OnStart(const shell::Identity& identity) { |
views::WindowManagerConnection::Create(connector(), identity); |
} |
-bool TaskViewer::OnConnect(const shell::Identity& remote_identity, |
- shell::InterfaceRegistry* registry) { |
+bool TaskViewer::OnConnect(const service_manager::Identity& remote_identity, |
+ service_manager::InterfaceRegistry* registry) { |
registry->AddInterface<mojom::Launchable>(this); |
return true; |
} |
@@ -305,11 +307,12 @@ void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) { |
return; |
} |
- shell::mojom::ServiceManagerPtr service_manager; |
+ service_manager::mojom::ServiceManagerPtr service_manager; |
connector()->ConnectToInterface("service:shell", &service_manager); |
- shell::mojom::ServiceManagerListenerPtr listener; |
- shell::mojom::ServiceManagerListenerRequest request = GetProxy(&listener); |
+ service_manager::mojom::ServiceManagerListenerPtr listener; |
+ service_manager::mojom::ServiceManagerListenerRequest request = |
+ GetProxy(&listener); |
service_manager->AddListener(std::move(listener)); |
catalog::mojom::CatalogPtr catalog; |
@@ -323,7 +326,7 @@ void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) { |
windows_.push_back(window); |
} |
-void TaskViewer::Create(const shell::Identity& remote_identity, |
+void TaskViewer::Create(const service_manager::Identity& remote_identity, |
mojom::LaunchableRequest request) { |
bindings_.AddBinding(this, std::move(request)); |
} |