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

Unified Diff: chrome/browser/ui/extensions/app_launch_params.h

Issue 2894743002: Make launching apps from shelf more intuitive (Closed)
Patch Set: This patch set has many platform related issue Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/extensions/app_launch_params.h
diff --git a/chrome/browser/ui/extensions/app_launch_params.h b/chrome/browser/ui/extensions/app_launch_params.h
index 8ca55e2b2ec56b502584e128163ce2172cf72dfe..733eb4848c5dcce15771e041d3bb63d0becf20f2 100644
--- a/chrome/browser/ui/extensions/app_launch_params.h
+++ b/chrome/browser/ui/extensions/app_launch_params.h
@@ -12,6 +12,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "extensions/common/api/app_runtime.h"
#include "extensions/common/constants.h"
+#include "ui/aura/window.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/geometry/rect.h"
#include "url/gurl.h"
@@ -28,7 +29,8 @@ struct AppLaunchParams {
extensions::LaunchContainer container,
WindowOpenDisposition disposition,
extensions::AppLaunchSource source,
- bool set_playstore_status = false);
+ bool set_playstore_status = false,
+ const aura::Window* root_window = NULL);
stevenjb 2017/05/22 17:55:29 nullptr
AppLaunchParams(const AppLaunchParams& other);
@@ -71,6 +73,9 @@ struct AppLaunchParams {
// Status of ARC on this device.
extensions::api::app_runtime::PlayStoreStatus play_store_status;
+
+ // The root window from which the app is launched.
+ const aura::Window* root_window;
};
// Helper to create AppLaunchParams using extensions::GetLaunchContainer with
@@ -83,11 +88,13 @@ AppLaunchParams CreateAppLaunchParamsUserContainer(
// Helper to create AppLaunchParams using event flags that allows user to
// override the user-configured container using modifier keys, falling back to
-// extensions::GetLaunchContainer() with no modifiers.
+// extensions::GetLaunchContainer() with no modifiers. |root_window| is the root
+// window from which the app is launched.
AppLaunchParams CreateAppLaunchParamsWithEventFlags(
Profile* profile,
const extensions::Extension* extension,
int event_flags,
- extensions::AppLaunchSource source);
+ extensions::AppLaunchSource source,
+ const aura::Window* root_window);
#endif // CHROME_BROWSER_UI_EXTENSIONS_APP_LAUNCH_PARAMS_H_

Powered by Google App Engine
This is Rietveld 408576698