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

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

Issue 722703002: Make "source" a required argument of AppLaunchParams and fill in the argument in all call points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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_APP_LAUNCH_PARAMS_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ 6 #define CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "chrome/browser/ui/host_desktop.h" 12 #include "chrome/browser/ui/host_desktop.h"
13 #include "chrome/common/extensions/extension_constants.h" 13 #include "chrome/common/extensions/extension_constants.h"
14 #include "extensions/common/constants.h" 14 #include "extensions/common/constants.h"
15 #include "ui/base/window_open_disposition.h" 15 #include "ui/base/window_open_disposition.h"
16 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 class Profile; 19 class Profile;
20 20
21 namespace extensions { 21 namespace extensions {
22 class Extension; 22 class Extension;
23 } 23 }
24 24
25 struct AppLaunchParams { 25 struct AppLaunchParams {
26 AppLaunchParams(Profile* profile, 26 AppLaunchParams(Profile* profile,
27 const extensions::Extension* extension, 27 const extensions::Extension* extension,
28 extensions::LaunchContainer container, 28 extensions::LaunchContainer container,
29 WindowOpenDisposition disposition); 29 WindowOpenDisposition disposition,
30 extensions::AppLaunchSource source);
30 31
31 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with 32 // Helper to create AppLaunchParams using extensions::GetLaunchContainer with
32 // LAUNCH_TYPE_REGULAR to check for a user-configured container. 33 // LAUNCH_TYPE_REGULAR to check for a user-configured container.
33 AppLaunchParams(Profile* profile, 34 AppLaunchParams(Profile* profile,
34 const extensions::Extension* extension, 35 const extensions::Extension* extension,
35 WindowOpenDisposition disposition); 36 WindowOpenDisposition disposition,
37 extensions::AppLaunchSource source);
36 38
37 // Helper to create AppLaunchParams using event flags that allows user to 39 // Helper to create AppLaunchParams using event flags that allows user to
38 // override the user-configured container using modifier keys, falling back to 40 // override the user-configured container using modifier keys, falling back to
39 // extensions::GetLaunchContainer() with no modifiers. |desktop_type| 41 // extensions::GetLaunchContainer() with no modifiers. |desktop_type|
40 // indicates the desktop upon which to launch (Ash or Native). 42 // indicates the desktop upon which to launch (Ash or Native).
41 AppLaunchParams(Profile* profile, 43 AppLaunchParams(Profile* profile,
42 const extensions::Extension* extension, 44 const extensions::Extension* extension,
43 int event_flags, 45 WindowOpenDisposition disposition,
44 chrome::HostDesktopType desktop_type); 46 chrome::HostDesktopType desktop_type,
47 extensions::AppLaunchSource source);
45 48
46 ~AppLaunchParams(); 49 ~AppLaunchParams();
47 50
48 // The profile to load the application from. 51 // The profile to load the application from.
49 Profile* profile; 52 Profile* profile;
50 53
51 // The extension to load. 54 // The extension to load.
52 std::string extension_id; 55 std::string extension_id;
53 56
54 // The container type to launch the application in. 57 // The container type to launch the application in.
(...skipping 19 matching lines...) Expand all
74 // If non-empty, the current directory from which any relative paths on the 77 // If non-empty, the current directory from which any relative paths on the
75 // command line should be expanded from. 78 // command line should be expanded from.
76 base::FilePath current_directory; 79 base::FilePath current_directory;
77 80
78 // Record where the app is launched from for tracking purpose. 81 // Record where the app is launched from for tracking purpose.
79 // Different app may have their own enumeration of sources. 82 // Different app may have their own enumeration of sources.
80 extensions::AppLaunchSource source; 83 extensions::AppLaunchSource source;
81 }; 84 };
82 85
83 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_ 86 #endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm ('k') | chrome/browser/ui/extensions/app_launch_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698