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

Unified Diff: chrome/browser/ui/ash/launcher/browser_status_monitor.cc

Issue 2835063003: mash: Use ChromeLauncherControllerImpl, remove Mus subclass stub. (Closed)
Patch Set: Add comment and separate mash-only members. Created 3 years, 8 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: chrome/browser/ui/ash/launcher/browser_status_monitor.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
index 56d1117197caa85f2dc0b23dc86a4d4fa181eccc..49c615b92069bce48e3f51458c461d6ef04b1ea6 100644
--- a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
+++ b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
@@ -8,6 +8,7 @@
#include "ash/wm/window_util.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
@@ -82,11 +83,14 @@ BrowserStatusMonitor::BrowserStatusMonitor(
: launcher_controller_(launcher_controller),
browser_tab_strip_tracker_(this, this, this) {
DCHECK(launcher_controller_);
- ash::Shell::Get()->activation_client()->AddObserver(this);
+ // TODO(crbug.com/557406): Fix this interaction pattern in Mash.
+ if (!ash_util::IsRunningInMash())
+ ash::Shell::Get()->activation_client()->AddObserver(this);
}
BrowserStatusMonitor::~BrowserStatusMonitor() {
- ash::Shell::Get()->activation_client()->RemoveObserver(this);
+ if (!ash_util::IsRunningInMash())
+ ash::Shell::Get()->activation_client()->RemoveObserver(this);
browser_tab_strip_tracker_.StopObservingAndSendOnBrowserRemoved();
}

Powered by Google App Engine
This is Rietveld 408576698