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

Unified Diff: ash/common/new_window_controller.cc

Issue 2549903002: mash: Reverse the responsibilities of the NewWindowClient. (Closed)
Patch Set: Make StickyKeysBrowserTest how it was before last patch + RunAllPendingInMessageLoop. Created 4 years 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: ash/common/new_window_controller.cc
diff --git a/ash/common/new_window_controller.cc b/ash/common/new_window_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2318ec20f3e7dfd1c811345117ca03123a6e0b17
--- /dev/null
+++ b/ash/common/new_window_controller.cc
@@ -0,0 +1,72 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/common/new_window_controller.h"
+
+#include "base/logging.h"
James Cook 2016/12/06 22:55:42 still needed?
Elliot Glaysher 2016/12/07 00:22:30 Done.
+#include "content/public/common/service_names.mojom.h"
James Cook 2016/12/06 22:55:42 still needed?
Elliot Glaysher 2016/12/07 00:22:30 Done.
+#include "services/service_manager/public/cpp/connector.h"
James Cook 2016/12/06 22:55:42 ditto
Elliot Glaysher 2016/12/07 00:22:30 Done.
+
+namespace ash {
+
+NewWindowController::NewWindowController() {}
+
+NewWindowController::~NewWindowController() {}
+
+void NewWindowController::BindRequest(
+ mojom::NewWindowControllerRequest request) {
+ bindings_.AddBinding(this, std::move(request));
James Cook 2016/12/06 22:55:42 #include <utility>
Elliot Glaysher 2016/12/07 00:22:30 Done.
+}
+
+void NewWindowController::NewTab() {
+ if (client_)
+ client_->NewTab();
+}
+
+void NewWindowController::NewWindow(bool incognito) {
+ if (client_)
+ client_->NewWindow(incognito);
+}
+
+void NewWindowController::OpenFileManager() {
+ if (client_)
+ client_->OpenFileManager();
+}
+
+void NewWindowController::OpenCrosh() {
+ if (client_)
+ client_->OpenCrosh();
+}
+
+void NewWindowController::OpenGetHelp() {
+ if (client_)
+ client_->OpenGetHelp();
+}
+
+void NewWindowController::RestoreTab() {
+ if (client_)
+ client_->RestoreTab();
+}
+
+void NewWindowController::ShowKeyboardOverlay() {
+ if (client_)
+ client_->ShowKeyboardOverlay();
+}
+
+void NewWindowController::ShowTaskManager() {
+ if (client_)
+ client_->ShowTaskManager();
+}
+
+void NewWindowController::OpenFeedbackPage() {
+ if (client_)
+ client_->OpenFeedbackPage();
+}
+
+void NewWindowController::SetClient(
+ mojom::NewWindowClientAssociatedPtrInfo client) {
+ client_.Bind(std::move(client));
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698