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 |
(...skipping 23 matching lines...) Expand all Loading... |
34 CLOSEDBYUSER, | 34 CLOSEDBYUSER, |
35 LASTEXECUTIONSTATE, | 35 LASTEXECUTIONSTATE, |
36 }; | 36 }; |
37 | 37 |
38 // Contains information about the currently displayed tab in metro mode. | 38 // Contains information about the currently displayed tab in metro mode. |
39 struct CurrentTabInfo { | 39 struct CurrentTabInfo { |
40 wchar_t* title; | 40 wchar_t* title; |
41 wchar_t* url; | 41 wchar_t* url; |
42 }; | 42 }; |
43 | 43 |
44 // The types of exports in metro_driver.dll. | |
45 typedef HRESULT (*ActivateApplicationFn)(const wchar_t*); | |
46 | |
47 // The names of the exports in metro_driver.dll. | 44 // The names of the exports in metro_driver.dll. |
48 BASE_EXPORT extern const char kActivateApplication[]; | 45 BASE_EXPORT extern const char kActivateApplication[]; |
49 | 46 |
50 // Returns the handle to the metro dll loaded in the process. A NULL return | 47 // Returns the handle to the metro dll loaded in the process. A NULL return |
51 // indicates that the metro dll was not loaded in the process. | 48 // indicates that the metro dll was not loaded in the process. |
52 BASE_EXPORT HMODULE GetMetroModule(); | 49 BASE_EXPORT HMODULE GetMetroModule(); |
53 | 50 |
54 // Returns true if this process is running as an immersive program | 51 // Returns true if this process is running as an immersive program |
55 // in Windows Metro mode. | 52 // in Windows Metro mode. |
56 BASE_EXPORT bool IsMetroProcess(); | 53 BASE_EXPORT bool IsMetroProcess(); |
57 | 54 |
58 // Allocates and returns the destination string via the LocalAlloc API after | 55 // Allocates and returns the destination string via the LocalAlloc API after |
59 // copying the src to it. | 56 // copying the src to it. |
60 BASE_EXPORT wchar_t* LocalAllocAndCopyString(const string16& src); | 57 BASE_EXPORT wchar_t* LocalAllocAndCopyString(const string16& src); |
61 | 58 |
62 // Returns true if the screen supports touch. | 59 // Returns true if the screen supports touch. |
63 BASE_EXPORT bool IsTouchEnabled(); | 60 BASE_EXPORT bool IsTouchEnabled(); |
64 | 61 |
65 // Returns true if Windows Parental control activity logging is enabled. This | 62 // Returns true if Windows Parental control activity logging is enabled. This |
66 // feature is available on Windows Vista and beyond. | 63 // feature is available on Windows Vista and beyond. |
67 // This function should ideally be called on the UI thread. | 64 // This function should ideally be called on the UI thread. |
68 BASE_EXPORT bool IsParentalControlActivityLoggingOn(); | 65 BASE_EXPORT bool IsParentalControlActivityLoggingOn(); |
69 | 66 |
| 67 // Typedef for function to activate metro application. |
| 68 typedef HRESULT (*ActivateApplicationFn)(const wchar_t*); |
| 69 |
| 70 // Typedef for function to break out of metro snap mode. |
| 71 typedef void (*MetroUnsnapFn)(); |
| 72 |
70 // Handler function for the buttons on a metro dialog box | 73 // Handler function for the buttons on a metro dialog box |
71 typedef void (*MetroDialogButtonPressedHandler)(); | 74 typedef void (*MetroDialogButtonPressedHandler)(); |
72 | 75 |
73 // Function to display metro style notifications. | 76 // Function to display metro style notifications. |
74 typedef void (*MetroNotification)(const char* origin_url, | 77 typedef void (*MetroNotification)(const char* origin_url, |
75 const char* icon_url, | 78 const char* icon_url, |
76 const wchar_t* title, | 79 const wchar_t* title, |
77 const wchar_t* body, | 80 const wchar_t* body, |
78 const wchar_t* display_source, | 81 const wchar_t* display_source, |
79 const char* notification_id); | 82 const char* notification_id); |
80 | |
81 | |
82 } // namespace win | 83 } // namespace win |
83 } // namespace base | 84 } // namespace base |
84 | 85 |
85 #endif // BASE_WIN_METRO_H_ | 86 #endif // BASE_WIN_METRO_H_ |
OLD | NEW |