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

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc

Issue 2860503002: mash: Replace int ShelfIDs with AppLaunchID strings. (Closed)
Patch Set: Fix struct traits typo. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h " 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.h "
6 6
7 #include "apps/ui/views/app_window_frame_view.h" 7 #include "apps/ui/views/app_window_frame_view.h"
8 #include "ash/ash_constants.h" 8 #include "ash/ash_constants.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/frame/custom_frame_view_ash.h" 10 #include "ash/frame/custom_frame_view_ash.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 ChromeNativeAppWindowViewsAuraAsh::ChromeNativeAppWindowViewsAuraAsh() {} 125 ChromeNativeAppWindowViewsAuraAsh::ChromeNativeAppWindowViewsAuraAsh() {}
126 126
127 ChromeNativeAppWindowViewsAuraAsh::~ChromeNativeAppWindowViewsAuraAsh() {} 127 ChromeNativeAppWindowViewsAuraAsh::~ChromeNativeAppWindowViewsAuraAsh() {}
128 128
129 void ChromeNativeAppWindowViewsAuraAsh::InitializeWindow( 129 void ChromeNativeAppWindowViewsAuraAsh::InitializeWindow(
130 AppWindow* app_window, 130 AppWindow* app_window,
131 const AppWindow::CreateParams& create_params) { 131 const AppWindow::CreateParams& create_params) {
132 ChromeNativeAppWindowViewsAura::InitializeWindow(app_window, create_params); 132 ChromeNativeAppWindowViewsAura::InitializeWindow(app_window, create_params);
133 aura::Window* window = widget()->GetNativeWindow(); 133 aura::Window* window = widget()->GetNativeWindow();
134 window->SetProperty(aura::client::kAppIdKey,
135 new std::string(app_window->extension_id()));
136 134
137 if (app_window->window_type_is_panel()) { 135 if (app_window->window_type_is_panel()) {
138 // Ash's ShelfWindowWatcher handles app panel windows once this type is set. 136 // Ash's ShelfWindowWatcher handles app panel windows once this type is set.
139 // The type should have been initialized for mash below, via mus_properties. 137 // The type should have been initialized for mash below, via mus_properties.
140 if (!ash_util::IsRunningInMash()) 138 if (!ash_util::IsRunningInMash())
141 window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_APP_PANEL); 139 window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_APP_PANEL);
142 } else { 140 } else {
143 window->SetProperty(aura::client::kAppType, 141 window->SetProperty(aura::client::kAppType,
144 static_cast<int>(ash::AppType::CHROME_APP)); 142 static_cast<int>(ash::AppType::CHROME_APP));
145 } 143 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 window_tree_host->SetClientArea(insets, 371 window_tree_host->SetClientArea(insets,
374 std::move(additional_client_regions)); 372 std::move(additional_client_regions));
375 } 373 }
376 } 374 }
377 375
378 void ChromeNativeAppWindowViewsAuraAsh::OnMenuClosed() { 376 void ChromeNativeAppWindowViewsAuraAsh::OnMenuClosed() {
379 menu_runner_.reset(); 377 menu_runner_.reset();
380 menu_model_adapter_.reset(); 378 menu_model_adapter_.reset();
381 menu_model_.reset(); 379 menu_model_.reset();
382 } 380 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/settings_window_observer.cc ('k') | chrome/browser/ui/views/frame/browser_frame_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698