Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / ui / extensions / app_launch_params.h
blob3b69479c6c798b17f29bb1d516b9fda03de41f45
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.
5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_
8 #include <string>
10 #include "base/command_line.h"
11 #include "base/files/file_path.h"
12 #include "chrome/browser/ui/host_desktop.h"
13 #include "chrome/common/extensions/extension_constants.h"
14 #include "extensions/common/constants.h"
15 #include "ui/base/window_open_disposition.h"
16 #include "ui/gfx/geometry/rect.h"
17 #include "url/gurl.h"
19 class Profile;
21 namespace extensions {
22 class Extension;
25 struct AppLaunchParams {
26 AppLaunchParams(Profile* profile,
27 const extensions::Extension* extension,
28 extensions::LaunchContainer container,
29 WindowOpenDisposition disposition,
30 extensions::AppLaunchSource source);
32 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with
33 // LAUNCH_TYPE_REGULAR to check for a user-configured container.
34 AppLaunchParams(Profile* profile,
35 const extensions::Extension* extension,
36 WindowOpenDisposition disposition,
37 extensions::AppLaunchSource source);
39 // Helper to create AppLaunchParams using event flags that allows user to
40 // override the user-configured container using modifier keys, falling back to
41 // extensions::GetLaunchContainer() with no modifiers. |desktop_type|
42 // indicates the desktop upon which to launch (Ash or Native).
43 AppLaunchParams(Profile* profile,
44 const extensions::Extension* extension,
45 WindowOpenDisposition disposition,
46 chrome::HostDesktopType desktop_type,
47 extensions::AppLaunchSource source);
49 ~AppLaunchParams();
51 // The profile to load the application from.
52 Profile* profile;
54 // The extension to load.
55 std::string extension_id;
57 // The container type to launch the application in.
58 extensions::LaunchContainer container;
60 // If container is TAB, this field controls how the tab is opened.
61 WindowOpenDisposition disposition;
63 // The desktop type to launch on. Uses GetActiveDesktop() if unspecified.
64 chrome::HostDesktopType desktop_type;
66 // If non-empty, use override_url in place of the application's launch url.
67 GURL override_url;
69 // If non-empty, use override_boudns in place of the application's default
70 // position and dimensions.
71 gfx::Rect override_bounds;
73 // If non-empty, information from the command line may be passed on to the
74 // application.
75 base::CommandLine command_line;
77 // If non-empty, the current directory from which any relative paths on the
78 // command line should be expanded from.
79 base::FilePath current_directory;
81 // Record where the app is launched from for tracking purpose.
82 // Different app may have their own enumeration of sources.
83 extensions::AppLaunchSource source;
86 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_