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

Side by Side Diff: base/win/metro.h

Issue 11280112: UMA for Windows 8 Secondary Tile pinning/unpinning user actions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: update member function comment Created 8 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef BASE_WIN_METRO_H_ 5 #ifndef BASE_WIN_METRO_H_
6 #define BASE_WIN_METRO_H_ 6 #define BASE_WIN_METRO_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <wpcapi.h> 9 #include <wpcapi.h>
10 10
11 #include "base/base_export.h" 11 #include "base/base_export.h"
12 #include "base/callback.h"
13 #include "base/file_path.h"
12 #include "base/string16.h" 14 #include "base/string16.h"
13 15
14 namespace base { 16 namespace base {
15 namespace win { 17 namespace win {
16 18
17 // Identifies the type of the metro launch. 19 // Identifies the type of the metro launch.
18 enum MetroLaunchType { 20 enum MetroLaunchType {
19 METRO_LAUNCH, 21 METRO_LAUNCH,
20 METRO_SEARCH, 22 METRO_SEARCH,
21 METRO_SHARE, 23 METRO_SHARE,
22 METRO_FILE, 24 METRO_FILE,
23 METRO_PROTOCOL, 25 METRO_PROTOCOL,
24 METRO_LAUNCH_ERROR, 26 METRO_LAUNCH_ERROR,
25 METRO_LASTLAUNCHTYPE, 27 METRO_LASTLAUNCHTYPE,
26 }; 28 };
27 29
28 // In metro mode, this enum identifies the last execution state, i.e. whether 30 // In metro mode, this enum identifies the last execution state, i.e. whether
29 // we crashed, terminated, etc. 31 // we crashed, terminated, etc.
30 enum MetroPreviousExecutionState { 32 enum MetroPreviousExecutionState {
31 NOTRUNNING, 33 NOTRUNNING,
32 RUNNING, 34 RUNNING,
33 SUSPENDED, 35 SUSPENDED,
34 TERMINATED, 36 TERMINATED,
35 CLOSEDBYUSER, 37 CLOSEDBYUSER,
36 LASTEXECUTIONSTATE, 38 LASTEXECUTIONSTATE,
37 }; 39 };
38 40
41 // Enum values for UMA histogram reporting of site-specific tile pinning.
cpu_(ooo_6.6-7.5) 2012/12/04 00:46:50 please create a todo and a bug to remove this from
tapted 2012/12/04 03:04:11 Done.
42 enum MetroSecondaryTilePinUmaResult {
43 METRO_PIN_STATE_NONE,
44 METRO_PIN_INITIATED,
45 METRO_PIN_LOGO_READY,
46 METRO_PIN_REQUEST_SHOW_ERROR,
47 METRO_PIN_RESULT_CANCEL,
48 METRO_PIN_RESULT_OK,
49 METRO_PIN_RESULT_OTHER,
50 METRO_PIN_RESULT_ERROR,
51 METRO_UNPIN_INITIATED,
52 METRO_UNPIN_REQUEST_SHOW_ERROR,
53 METRO_UNPIN_RESULT_CANCEL,
54 METRO_UNPIN_RESULT_OK,
55 METRO_UNPIN_RESULT_OTHER,
56 METRO_UNPIN_RESULT_ERROR,
57 METRO_PIN_STATE_LIMIT
58 };
59
39 // Contains information about the currently displayed tab in metro mode. 60 // Contains information about the currently displayed tab in metro mode.
40 struct CurrentTabInfo { 61 struct CurrentTabInfo {
41 wchar_t* title; 62 wchar_t* title;
42 wchar_t* url; 63 wchar_t* url;
43 }; 64 };
44 65
45 // Returns the handle to the metro dll loaded in the process. A NULL return 66 // Returns the handle to the metro dll loaded in the process. A NULL return
46 // indicates that the metro dll was not loaded in the process. 67 // indicates that the metro dll was not loaded in the process.
47 BASE_EXPORT HMODULE GetMetroModule(); 68 BASE_EXPORT HMODULE GetMetroModule();
48 69
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Function to display metro style notifications. 111 // Function to display metro style notifications.
91 typedef void (*MetroNotification)(const char* origin_url, 112 typedef void (*MetroNotification)(const char* origin_url,
92 const char* icon_url, 113 const char* icon_url,
93 const wchar_t* title, 114 const wchar_t* title,
94 const wchar_t* body, 115 const wchar_t* body,
95 const wchar_t* display_source, 116 const wchar_t* display_source,
96 const char* notification_id, 117 const char* notification_id,
97 MetroNotificationClickedHandler handler, 118 MetroNotificationClickedHandler handler,
98 const wchar_t* handler_context); 119 const wchar_t* handler_context);
99 120
121 // Callback for UMA invoked by Metro Pin and UnPin functions after user gesture.
122 typedef base::Callback<void(MetroSecondaryTilePinUmaResult)>
123 MetroPinUmaResultCallback;
124
125 // Function to pin a site-specific tile (bookmark) to the start screen.
126 typedef void (*MetroPinToStartScreen)(
127 const string16& tile_id,
128 const string16& title,
129 const string16& url,
130 const FilePath& logo_path,
131 const MetroPinUmaResultCallback& callback);
132
133 // Function to un-pin a site-specific tile (bookmark) from the start screen.
134 typedef void (*MetroUnPinFromStartScreen)(
135 const string16& title_id,
136 const MetroPinUmaResultCallback& callback);
137
100 } // namespace win 138 } // namespace win
101 } // namespace base 139 } // namespace base
102 140
103 #endif // BASE_WIN_METRO_H_ 141 #endif // BASE_WIN_METRO_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698