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 CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <windows.applicationmodel.core.h> | 9 #include <windows.applicationmodel.core.h> |
10 #include <Windows.applicationModel.search.h> | 10 #include <Windows.applicationModel.search.h> |
(...skipping 19 matching lines...) Expand all Loading... |
30 void Activate(winapp::Activation::IActivatedEventArgs* args); | 30 void Activate(winapp::Activation::IActivatedEventArgs* args); |
31 | 31 |
32 private: | 32 private: |
33 // Invoked when we receive search notifications in metro chrome. | 33 // Invoked when we receive search notifications in metro chrome. |
34 template<class T> void HandleSearchRequest(T* args); | 34 template<class T> void HandleSearchRequest(T* args); |
35 | 35 |
36 HRESULT OnQuerySubmitted( | 36 HRESULT OnQuerySubmitted( |
37 winapp::Search::ISearchPane* search_pane, | 37 winapp::Search::ISearchPane* search_pane, |
38 winapp::Search::ISearchPaneQuerySubmittedEventArgs* args); | 38 winapp::Search::ISearchPaneQuerySubmittedEventArgs* args); |
39 | 39 |
40 string16 GetUrlFromLaunchArgs(const string16& launch_args); | 40 base::string16 GetUrlFromLaunchArgs(const base::string16& launch_args); |
41 | 41 |
42 // Invoked when a url is navigated from a metro app or in the metro | 42 // Invoked when a url is navigated from a metro app or in the metro |
43 // shelf. | 43 // shelf. |
44 void HandleProtocolLaunch( | 44 void HandleProtocolLaunch( |
45 winapp::Activation::IProtocolActivatedEventArgs* args); | 45 winapp::Activation::IProtocolActivatedEventArgs* args); |
46 | 46 |
47 // Invoked when the app is launched normally | 47 // Invoked when the app is launched normally |
48 void HandleLaunch(winapp::Activation::ILaunchActivatedEventArgs* args); | 48 void HandleLaunch(winapp::Activation::ILaunchActivatedEventArgs* args); |
49 | 49 |
50 // Helper function to initiate a navigation or search request in chrome. | 50 // Helper function to initiate a navigation or search request in chrome. |
51 void InitiateNavigationOrSearchRequest(const wchar_t* url, | 51 void InitiateNavigationOrSearchRequest(const wchar_t* url, |
52 const wchar_t* search_string); | 52 const wchar_t* search_string); |
53 | 53 |
54 Microsoft::WRL::ComPtr<winapp::Search::ISearchPane> search_pane_; | 54 Microsoft::WRL::ComPtr<winapp::Search::ISearchPane> search_pane_; |
55 EventRegistrationToken query_submitted_token_; | 55 EventRegistrationToken query_submitted_token_; |
56 }; | 56 }; |
57 | 57 |
58 #endif // CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_ | 58 #endif // CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_ |
OLD | NEW |