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

Side by Side Diff: win8/metro_driver/chrome_url_launch_handler.h

Issue 10875008: Integrate the Windows 8 code into the Chromium tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove conflicting OWNERS file. Created 8 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « win8/metro_driver/chrome_app_view.cc ('k') | win8/metro_driver/chrome_url_launch_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_
6 #define CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_
7
8 #include <string>
9 #include <windows.applicationmodel.core.h>
10 #include <Windows.applicationModel.search.h>
11 #include <windows.ui.core.h>
12
13 #include "winrt_utils.h"
14
15 // This class handles the various flavors of URL launches in metro, i.e.
16 // via the search charm, via a url being navigated from a metro app, etc.
17 class ChromeUrlLaunchHandler {
18 public:
19 ChromeUrlLaunchHandler();
20 ~ChromeUrlLaunchHandler();
21
22 HRESULT Initialize();
23
24 // If metro chrome was launched due to a URL navigation/search request then
25 // the navigation should be done when the frame window is initialized. This
26 // function is called to complete the pending navigation when we receive a
27 // notification from chrome that the frame window is initialized.
28 void PerformPendingNavigation();
29
30 void Activate(winapp::Activation::IActivatedEventArgs* args);
31
32 private:
33 // Invoked when we receive search notifications in metro chrome.
34 template<class T> void HandleSearchRequest(T* args);
35
36 HRESULT OnQuerySubmitted(
37 winapp::Search::ISearchPane* search_pane,
38 winapp::Search::ISearchPaneQuerySubmittedEventArgs* args);
39
40 string16 GetUrlFromLaunchArgs(const string16& launch_args);
41
42 // Invoked when a url is navigated from a metro app or in the metro
43 // shelf.
44 void HandleProtocolLaunch(
45 winapp::Activation::IProtocolActivatedEventArgs* args);
46
47 // Invoked when the app is launched normally
48 void HandleLaunch(winapp::Activation::ILaunchActivatedEventArgs* args);
49
50 // Helper function to initiate a navigation or search request in chrome.
51 void InitiateNavigationOrSearchRequest(const wchar_t* url,
52 const wchar_t* search_string);
53
54 Microsoft::WRL::ComPtr<winapp::Search::ISearchPane> search_pane_;
55 EventRegistrationToken query_submitted_token_;
56 };
57
58 #endif // CHROME_BROWSER_UI_METRO_DRIVER_CHROME_URL_LAUNCH_HANDLER_H_
OLDNEW
« no previous file with comments | « win8/metro_driver/chrome_app_view.cc ('k') | win8/metro_driver/chrome_url_launch_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698