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

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

Issue 2331093002: UMA stats for stylus usage (Closed)
Patch Set: Changed ash/BUILD.gn 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.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
index dfac3ccb9df96687260667119b6d559880f36475..2cea0ffaa180e2eb0bb5ab0a00b086630032c36e 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
@@ -23,6 +23,11 @@
#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h"
+#if defined(OS_CHROMEOS)
+#include "ash/shared/app_types.h"
+#include "chrome/browser/chromeos/note_taking_app_utils.h"
+#endif
+
using extensions::AppWindow;
namespace {
@@ -141,6 +146,16 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow(
OnBeforeWidgetInit(create_params, &init_params, widget());
widget()->Init(init_params);
+#if defined(OS_CHROMEOS)
+ ash::AppType appType = ash::AppType::CHROME_APP;
Daniel Erat 2016/09/27 19:15:10 s/appType/app_type/
xiaoyinh(OOO Sep 11-29) 2016/09/29 20:37:43 Done. I've moved this logic to chrome_native_app_w
+ Profile* profile =
+ Profile::FromBrowserContext(app_window()->browser_context());
+ if (profile && chromeos::IsNoteTakingApp(app_window(), profile))
+ appType = ash::AppType::DEFAULT_NOTE_TAKING_APP;
+ widget()->GetNativeWindow()->SetProperty(aura::client::kAppType,
+ static_cast<int>(appType));
+#endif
+
// The frame insets are required to resolve the bounds specifications
// correctly. So we set the window bounds and constraints now.
gfx::Insets frame_insets = GetFrameInsets();

Powered by Google App Engine
This is Rietveld 408576698