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

Unified Diff: mash/browser_driver/browser_driver_application_delegate.cc

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: mash/browser_driver/browser_driver_application_delegate.cc
diff --git a/mash/browser_driver/browser_driver_application_delegate.cc b/mash/browser_driver/browser_driver_application_delegate.cc
index 674be254de0a9305db9d6cf13d735d0187a95ca2..e5ea59a4dd440fad17d528fdeb1d261405e43055 100644
--- a/mash/browser_driver/browser_driver_application_delegate.cc
+++ b/mash/browser_driver/browser_driver_application_delegate.cc
@@ -9,7 +9,7 @@
#include "base/bind.h"
#include "components/mus/public/cpp/event_matcher.h"
#include "mojo/shell/public/cpp/connection.h"
-#include "mojo/shell/public/cpp/shell.h"
+#include "mojo/shell/public/cpp/connector.h"
namespace mash {
namespace browser_driver {
@@ -45,16 +45,16 @@ void AssertTrue(bool success) {
} // namespace
BrowserDriverApplicationDelegate::BrowserDriverApplicationDelegate()
- : shell_(nullptr),
+ : connector_(nullptr),
binding_(this) {}
BrowserDriverApplicationDelegate::~BrowserDriverApplicationDelegate() {}
-void BrowserDriverApplicationDelegate::Initialize(mojo::Shell* shell,
+void BrowserDriverApplicationDelegate::Initialize(mojo::Connector* connector,
const std::string& url,
uint32_t id,
uint32_t user_id) {
- shell_ = shell;
+ connector_ = connector;
AddAccelerators();
}
@@ -69,7 +69,7 @@ void BrowserDriverApplicationDelegate::OnAccelerator(
case Accelerator::NewWindow:
case Accelerator::NewTab:
case Accelerator::NewIncognitoWindow:
- shell_->Connect("exe:chrome");
+ connector_->Connect("exe:chrome");
// TODO(beng): have Chrome export a service that allows it to be driven by
// this driver, e.g. to open new tabs, incognito windows, etc.
break;
@@ -83,7 +83,7 @@ void BrowserDriverApplicationDelegate::AddAccelerators() {
// TODO(beng): find some other way to get the window manager. I don't like
// having to specify it by URL because it may differ per display.
mus::mojom::AcceleratorRegistrarPtr registrar;
- shell_->ConnectToInterface("mojo:desktop_wm", &registrar);
+ connector_->ConnectToInterface("mojo:desktop_wm", &registrar);
if (binding_.is_bound())
binding_.Unbind();

Powered by Google App Engine
This is Rietveld 408576698