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

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

Issue 2331093002: UMA stats for stylus usage (Closed)
Patch Set: nit and rebase Created 4 years, 3 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 48a8707a90744feef8222a31196d507a0bc3360b..53eb1a4aa62026389f763f5397812977fe79dbd0 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
@@ -13,11 +13,14 @@
#include "ash/common/wm/window_state_delegate.h"
#include "ash/common/wm/window_state_observer.h"
#include "ash/screen_util.h"
+#include "ash/shared/app_types.h"
#include "ash/shared/immersive_fullscreen_controller.h"
#include "ash/shell.h"
#include "ash/wm/panels/panel_frame_view.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/window_state_aura.h"
+#include "chrome/browser/chromeos/note_taking_app_utils.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h"
#include "services/ui/public/cpp/property_type_converters.h"
@@ -132,6 +135,16 @@ void ChromeNativeAppWindowViewsAuraAsh::InitializeWindow(
widget()->GetNativeWindow()->SetProperty(aura::client::kShowStateKey,
create_params.state);
}
+
+ if (!app_window->window_type_is_panel()) {
+ ash::AppType app_type = ash::AppType::CHROME_APP;
+ Profile* profile =
+ Profile::FromBrowserContext(app_window->browser_context());
+ if (profile && chromeos::IsNoteTakingAppWindow(app_window, profile))
+ app_type = ash::AppType::DEFAULT_NOTE_TAKING_APP;
+ widget()->GetNativeWindow()->SetProperty(aura::client::kAppType,
+ static_cast<int>(app_type));
+ }
}
void ChromeNativeAppWindowViewsAuraAsh::OnBeforeWidgetInit(

Powered by Google App Engine
This is Rietveld 408576698