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

Unified Diff: ash/wm_window.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/wm/workspace/workspace_window_resizer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm_window.cc
diff --git a/ash/wm_window.cc b/ash/wm_window.cc
index f009c108cd653648a5ee7c8536ef02a154ad751d..aa950b0071e25d31c53179e6b05febbf1467f150 100644
--- a/ash/wm_window.cc
+++ b/ash/wm_window.cc
@@ -6,11 +6,11 @@
#include "ash/ash_constants.h"
#include "ash/aura/aura_layout_manager_adapter.h"
+#include "ash/public/cpp/config.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/public/cpp/window_properties.h"
#include "ash/root_window_controller.h"
#include "ash/shell.h"
-#include "ash/shell_port.h"
#include "ash/wm/resize_handle_window_targeter.h"
#include "ash/wm/resize_shadow_controller.h"
#include "ash/wm/widget_finder.h"
@@ -576,7 +576,7 @@ void WmWindow::Show() {
}
void WmWindow::CloseWidget() {
- if (ShellPort::Get()->IsRunningInMash() &&
+ if (Shell::GetAshConfig() == Config::MASH &&
aura_window()->GetProperty(kWidgetCreationTypeKey) ==
WidgetCreationType::FOR_CLIENT) {
// NOTE: in the FOR_CLIENT case there is not necessarily a widget associated
@@ -639,7 +639,7 @@ WmWindow* WmWindow::GetChildByShellWindowId(int id) {
}
void WmWindow::ShowResizeShadow(int component) {
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
// TODO: http://crbug.com/640773.
return;
}
@@ -650,7 +650,7 @@ void WmWindow::ShowResizeShadow(int component) {
}
void WmWindow::HideResizeShadow() {
- if (ShellPort::Get()->IsRunningInMash()) {
+ if (Shell::GetAshConfig() == Config::MASH) {
// TODO: http://crbug.com/640773.
return;
}
@@ -721,7 +721,7 @@ void WmWindow::RemoveTransientWindowObserver(
void WmWindow::AddLimitedPreTargetHandler(ui::EventHandler* handler) {
// In mus AddPreTargetHandler() only works for windows created by this client.
- DCHECK(!ShellPort::Get()->IsRunningInMash() ||
+ DCHECK(Shell::GetAshConfig() != Config::MASH ||
Shell::window_tree_client()->WasCreatedByThisClient(
aura::WindowMus::Get(window_)));
window_->AddPreTargetHandler(handler);
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698