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

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: add TODO 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.
42 // TODO(tapted): Move this to win8/util when ready (http://crbug.com/160288).
43 enum MetroSecondaryTilePinUmaResult {
44 METRO_PIN_STATE_NONE,
45 METRO_PIN_INITIATED,
46 METRO_PIN_LOGO_READY,
47 METRO_PIN_REQUEST_SHOW_ERROR,
48 METRO_PIN_RESULT_CANCEL,
49 METRO_PIN_RESULT_OK,
50 METRO_PIN_RESULT_OTHER,
51 METRO_PIN_RESULT_ERROR,
52 METRO_UNPIN_INITIATED,
53 METRO_UNPIN_REQUEST_SHOW_ERROR,
54 METRO_UNPIN_RESULT_CANCEL,
55 METRO_UNPIN_RESULT_OK,
56 METRO_UNPIN_RESULT_OTHER,
57 METRO_UNPIN_RESULT_ERROR,
58 METRO_PIN_STATE_LIMIT
59 };
60
39 // Contains information about the currently displayed tab in metro mode. 61 // Contains information about the currently displayed tab in metro mode.
40 struct CurrentTabInfo { 62 struct CurrentTabInfo {
41 wchar_t* title; 63 wchar_t* title;
42 wchar_t* url; 64 wchar_t* url;
43 }; 65 };
44 66
45 // Returns the handle to the metro dll loaded in the process. A NULL return 67 // 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. 68 // indicates that the metro dll was not loaded in the process.
47 BASE_EXPORT HMODULE GetMetroModule(); 69 BASE_EXPORT HMODULE GetMetroModule();
48 70
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Function to display metro style notifications. 112 // Function to display metro style notifications.
91 typedef void (*MetroNotification)(const char* origin_url, 113 typedef void (*MetroNotification)(const char* origin_url,
92 const char* icon_url, 114 const char* icon_url,
93 const wchar_t* title, 115 const wchar_t* title,
94 const wchar_t* body, 116 const wchar_t* body,
95 const wchar_t* display_source, 117 const wchar_t* display_source,
96 const char* notification_id, 118 const char* notification_id,
97 MetroNotificationClickedHandler handler, 119 MetroNotificationClickedHandler handler,
98 const wchar_t* handler_context); 120 const wchar_t* handler_context);
99 121
122 // Callback for UMA invoked by Metro Pin and UnPin functions after user gesture.
123 typedef base::Callback<void(MetroSecondaryTilePinUmaResult)>
124 MetroPinUmaResultCallback;
125
126 // Function to pin a site-specific tile (bookmark) to the start screen.
127 typedef void (*MetroPinToStartScreen)(
128 const string16& tile_id,
129 const string16& title,
130 const string16& url,
131 const FilePath& logo_path,
132 const MetroPinUmaResultCallback& callback);
133
134 // Function to un-pin a site-specific tile (bookmark) from the start screen.
135 typedef void (*MetroUnPinFromStartScreen)(
136 const string16& title_id,
137 const MetroPinUmaResultCallback& callback);
138
100 } // namespace win 139 } // namespace win
101 } // namespace base 140 } // namespace base
102 141
103 #endif // BASE_WIN_METRO_H_ 142 #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