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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc

Issue 2927693002: mash: Limit ShelfWindowWatcher to panels and dialogs. (Closed)
Patch Set: Disable WindowSelectorTest.MultipleDisplays in mash. Created 3 years, 6 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/views/apps/chrome_native_app_window_views_aura_ash.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc
index 501fc6419610e560dd80f92aa8f4edb95dbbe73a..95beacfd8eb009f0e9cd680193d2f10c5dea38e7 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc
@@ -8,7 +8,6 @@
#include "ash/ash_constants.h"
#include "ash/ash_switches.h"
#include "ash/frame/custom_frame_view_ash.h"
-#include "ash/public/cpp/shelf_item.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/public/cpp/window_properties.h"
#include "ash/shared/app_types.h"
@@ -129,12 +128,7 @@ void ChromeNativeAppWindowViewsAuraAsh::InitializeWindow(
ChromeNativeAppWindowViewsAura::InitializeWindow(app_window, create_params);
aura::Window* window = widget()->GetNativeWindow();
- if (app_window->window_type_is_panel()) {
- // Ash's ShelfWindowWatcher handles app panel windows once this type is set.
- // The type should have been initialized for mash below, via mus_properties.
- if (!ash_util::IsRunningInMash())
- window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_APP_PANEL);
- } else {
+ if (!app_window->window_type_is_panel()) {
window->SetProperty(aura::client::kAppType,
static_cast<int>(ash::AppType::CHROME_APP));
}
@@ -171,17 +165,9 @@ void ChromeNativeAppWindowViewsAuraAsh::OnBeforeWidgetInit(
void ChromeNativeAppWindowViewsAuraAsh::OnBeforePanelWidgetInit(
views::Widget::InitParams* init_params,
views::Widget* widget) {
- ChromeNativeAppWindowViewsAura::OnBeforePanelWidgetInit(init_params,
- widget);
-
- if (ash_util::IsRunningInMash()) {
- // Ash's ShelfWindowWatcher handles app panel windows once this type is set.
- init_params
- ->mus_properties[ui::mojom::WindowManager::kShelfItemType_Property] =
- mojo::ConvertTo<std::vector<uint8_t>>(
- static_cast<aura::PropertyConverter::PrimitiveType>(
- ash::TYPE_APP_PANEL));
- } else if (ash::Shell::HasInstance()) {
+ ChromeNativeAppWindowViewsAura::OnBeforePanelWidgetInit(init_params, widget);
+
+ if (!ash_util::IsRunningInMash() && ash::Shell::HasInstance()) {
// Open a new panel on the target root.
init_params->context = ash::Shell::GetRootWindowForNewWindows();
init_params->bounds = gfx::Rect(GetPreferredSize());

Powered by Google App Engine
This is Rietveld 408576698