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

Side by Side Diff: chrome/browser/ui/extensions/application_launch.h

Issue 10332071: Pass command line arguments onto platform apps which provide the right intent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows tests fixed Created 8 years, 7 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
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 CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_ 6 #define CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/common/extensions/extension_constants.h" 9 #include "chrome/common/extensions/extension_constants.h"
10 #include "webkit/glue/window_open_disposition.h" 10 #include "webkit/glue/window_open_disposition.h"
11 11
12 class Browser; 12 class Browser;
13 class CommandLine;
13 class GURL; 14 class GURL;
14 class Profile; 15 class Profile;
15 16
16 namespace content { 17 namespace content {
17 class WebContents; 18 class WebContents;
18 } 19 }
19 20
20 namespace extensions { 21 namespace extensions {
21 class Extension; 22 class Extension;
22 } 23 }
23 24
24 namespace application_launch { 25 namespace application_launch {
25 26
26 // Open |extension| in |container|, using |disposition| if container type is 27 // Open |extension| in |container|, using |disposition| if container type is
27 // TAB. Returns the WebContents* that was created or NULL. If non-empty, 28 // TAB. Returns the WebContents* that was created or NULL. If non-empty,
28 // |override_url| is used in place of the app launch url. 29 // |override_url| is used in place of the app launch url. Pass relevant
30 // information in |command_line| onto platform app as launch data.
31 // |command_line| can be NULL, indicating there is no launch data to pass on.
32 // TODO(benwells): Put the parameters to this into an ApplicationLaunchParams
33 // struct.
29 content::WebContents* OpenApplication(Profile* profile, 34 content::WebContents* OpenApplication(Profile* profile,
30 const extensions::Extension* extension, 35 const extensions::Extension* extension,
31 extension_misc::LaunchContainer container, 36 extension_misc::LaunchContainer container,
32 const GURL& override_url, 37 const GURL& override_url,
33 WindowOpenDisposition disposition); 38 WindowOpenDisposition disposition,
39 const CommandLine* command_line);
34 40
35 #if defined(USE_ASH) 41 #if defined(USE_ASH)
36 // Opens |url| in a new application panel window for the specified url. 42 // Opens |url| in a new application panel window for the specified url.
37 content::WebContents* OpenApplicationPanel( 43 content::WebContents* OpenApplicationPanel(
38 Profile* profile, 44 Profile* profile,
39 const extensions::Extension* extension, 45 const extensions::Extension* extension,
40 const GURL& url); 46 const GURL& url);
41 #endif 47 #endif
42 48
43 // Opens a new application window for the specified url. If |as_panel| is true, 49 // Opens a new application window for the specified url. If |as_panel| is true,
(...skipping 23 matching lines...) Expand all
67 // there are no appropriate existing browser windows for |profile|. If 73 // there are no appropriate existing browser windows for |profile|. If
68 // non-empty, |override_url| is used in place of the app launch url. 74 // non-empty, |override_url| is used in place of the app launch url.
69 content::WebContents* OpenApplicationTab(Profile* profile, 75 content::WebContents* OpenApplicationTab(Profile* profile,
70 const extensions::Extension* extension, 76 const extensions::Extension* extension,
71 const GURL& override_url, 77 const GURL& override_url,
72 WindowOpenDisposition disposition); 78 WindowOpenDisposition disposition);
73 79
74 } // namespace application_launch 80 } // namespace application_launch
75 81
76 #endif // CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_ 82 #endif // CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/extensions/application_launch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698