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

Unified Diff: ash/shelf/shelf_window_watcher.cc

Issue 2815043002: Removes ShellPort::IsRunningInMash() (Closed)
Patch Set: dont set instance_ in constructor 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
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_window_watcher.cc
diff --git a/ash/shelf/shelf_window_watcher.cc b/ash/shelf/shelf_window_watcher.cc
index 43edc68d6977b91113ca804af6d1a275ce29fea9..6964bb12cbeb31115fc51aa6e76aafa387609697 100644
--- a/ash/shelf/shelf_window_watcher.cc
+++ b/ash/shelf/shelf_window_watcher.cc
@@ -7,6 +7,7 @@
#include <memory>
#include <utility>
+#include "ash/public/cpp/config.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/public/cpp/window_properties.h"
#include "ash/shelf/shelf_constants.h"
@@ -33,7 +34,7 @@ namespace {
// Returns the shelf item type, with special temporary behavior for Mash:
// Mash provides a default shelf item type (TYPE_APP) for non-ignored windows.
ShelfItemType GetShelfItemType(aura::Window* window) {
- if (!ShellPort::Get()->IsRunningInMash() ||
+ if (Shell::GetAshConfig() != Config::MASH ||
window->GetProperty(kShelfItemTypeKey) != TYPE_UNDEFINED) {
return static_cast<ShelfItemType>(window->GetProperty(kShelfItemTypeKey));
}
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698