| 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());
|
|
|