Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/file_path.h" | |
| 12 #include "base/string16.h" | 13 #include "base/string16.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 namespace win { | 16 namespace win { |
| 16 | 17 |
| 17 // Identifies the type of the metro launch. | 18 // Identifies the type of the metro launch. |
| 18 enum MetroLaunchType { | 19 enum MetroLaunchType { |
| 19 METRO_LAUNCH, | 20 METRO_LAUNCH, |
| 20 METRO_SEARCH, | 21 METRO_SEARCH, |
| 21 METRO_SHARE, | 22 METRO_SHARE, |
| 22 METRO_FILE, | 23 METRO_FILE, |
| 23 METRO_PROTOCOL, | 24 METRO_PROTOCOL, |
| 24 METRO_LAUNCH_ERROR, | 25 METRO_LAUNCH_ERROR, |
| 25 METRO_LASTLAUNCHTYPE, | 26 METRO_LASTLAUNCHTYPE, |
| 26 }; | 27 }; |
| 27 | 28 |
| 28 // In metro mode, this enum identifies the last execution state, i.e. whether | 29 // In metro mode, this enum identifies the last execution state, i.e. whether |
| 29 // we crashed, terminated, etc. | 30 // we crashed, terminated, etc. |
| 30 enum MetroPreviousExecutionState { | 31 enum MetroPreviousExecutionState { |
| 31 NOTRUNNING, | 32 NOTRUNNING, |
| 32 RUNNING, | 33 RUNNING, |
| 33 SUSPENDED, | 34 SUSPENDED, |
| 34 TERMINATED, | 35 TERMINATED, |
| 35 CLOSEDBYUSER, | 36 CLOSEDBYUSER, |
| 36 LASTEXECUTIONSTATE, | 37 LASTEXECUTIONSTATE, |
| 37 }; | 38 }; |
| 38 | 39 |
| 40 // Enum values for UMA histogram reporting of site-specific tile pinning. | |
|
benwells
2012/11/27 08:56:39
Does this stuff all have to go in this file? It do
tapted
2012/11/28 00:33:43
It needs to go somewhere shared between /win8 and
benwells
2012/11/29 04:19:46
I was referring to all the secondary tile stuff yo
tapted
2012/11/29 07:19:27
** Presubmit ERRORS **
You added one or more #incl
MAD
2012/11/29 15:26:18
If these are specific to UMA I would leave them he
tapted
2012/11/30 00:30:31
Done.
| |
| 41 enum MetroSecondaryTilePinState { | |
| 42 METRO_PIN_STATE_NONE, | |
| 43 METRO_PIN_INITIATED, | |
| 44 METRO_PIN_LOGO_READY, | |
| 45 METRO_PIN_REQUEST_SHOW_ERROR, | |
| 46 METRO_PIN_RESULT_CANCEL, | |
| 47 METRO_PIN_RESULT_OK, | |
| 48 METRO_PIN_RESULT_OTHER, | |
| 49 METRO_PIN_RESULT_ERROR, | |
| 50 METRO_UNPIN_INITIATED, | |
| 51 METRO_UNPIN_REQUEST_SHOW_ERROR, | |
| 52 METRO_UNPIN_RESULT_CANCEL, | |
| 53 METRO_UNPIN_RESULT_OK, | |
| 54 METRO_UNPIN_RESULT_OTHER, | |
| 55 METRO_UNPIN_RESULT_ERROR, | |
| 56 METRO_PIN_STATE_LIMIT | |
| 57 }; | |
| 58 | |
| 39 // Contains information about the currently displayed tab in metro mode. | 59 // Contains information about the currently displayed tab in metro mode. |
| 40 struct CurrentTabInfo { | 60 struct CurrentTabInfo { |
| 41 wchar_t* title; | 61 wchar_t* title; |
| 42 wchar_t* url; | 62 wchar_t* url; |
| 43 }; | 63 }; |
| 44 | 64 |
| 45 // Returns the handle to the metro dll loaded in the process. A NULL return | 65 // 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. | 66 // indicates that the metro dll was not loaded in the process. |
| 47 BASE_EXPORT HMODULE GetMetroModule(); | 67 BASE_EXPORT HMODULE GetMetroModule(); |
| 48 | 68 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // Function to display metro style notifications. | 110 // Function to display metro style notifications. |
| 91 typedef void (*MetroNotification)(const char* origin_url, | 111 typedef void (*MetroNotification)(const char* origin_url, |
| 92 const char* icon_url, | 112 const char* icon_url, |
| 93 const wchar_t* title, | 113 const wchar_t* title, |
| 94 const wchar_t* body, | 114 const wchar_t* body, |
| 95 const wchar_t* display_source, | 115 const wchar_t* display_source, |
| 96 const char* notification_id, | 116 const char* notification_id, |
| 97 MetroNotificationClickedHandler handler, | 117 MetroNotificationClickedHandler handler, |
| 98 const wchar_t* handler_context); | 118 const wchar_t* handler_context); |
| 99 | 119 |
| 120 // Callback invoked by Metro Pin and UnPin functions after user gesture. | |
| 121 typedef void (*MetroPinResultCallback)(void* callback_data, | |
| 122 MetroSecondaryTilePinState result); | |
| 123 | |
| 124 // Function to pin a site-specific tile (bookmark) to the start screen. | |
| 125 typedef void (*MetroPinToStartScreen)(const string16& tile_id, | |
| 126 const string16& title, | |
| 127 const string16& url, | |
| 128 const FilePath& logo_path, | |
| 129 MetroPinResultCallback callback, | |
| 130 void* callback_data); | |
| 131 | |
| 132 // Function to un-pin a site-specific tile (bookmark) from the start screen. | |
| 133 typedef void (*MetroUnPinFromStartScreen)(const string16& title_id, | |
| 134 MetroPinResultCallback callback, | |
| 135 void* callback_data); | |
| 136 | |
| 100 } // namespace win | 137 } // namespace win |
| 101 } // namespace base | 138 } // namespace base |
| 102 | 139 |
| 103 #endif // BASE_WIN_METRO_H_ | 140 #endif // BASE_WIN_METRO_H_ |
| OLD | NEW |