1 // Copyright 2014 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_APPS_APP_INFO_DIALOG_H_
6 #define CHROME_BROWSER_UI_APPS_APP_INFO_DIALOG_H_
8 #include "base/callback_forward.h"
9 #include "ui/gfx/native_widget_types.h"
13 namespace extensions
{
22 // Used for UMA to track where the App Info dialog is launched from.
23 enum AppInfoLaunchSource
{
24 FROM_APP_LIST
, // Launched from the app list context menu.
25 FROM_EXTENSIONS_PAGE
, // Launched from the chrome://extensions page.
26 FROM_APPS_PAGE
, // Launched from chrome://apps context menu.
30 // TODO(tsergeant): Move these methods into a class
31 // Returns true if the app info dialog is available on the current platform.
32 bool CanShowAppInfoDialog();
34 // Returns the size of the native window container for the app info dialog.
35 gfx::Size
GetAppInfoNativeDialogSize();
37 // Shows the chrome app information as a frameless window for the given |app|
38 // and |profile| at the given |app_list_bounds|. Appears 'inside' the app list.
39 void ShowAppInfoInAppList(gfx::NativeWindow parent
,
40 const gfx::Rect
& app_list_bounds
,
42 const extensions::Extension
* app
,
43 const base::Closure
& close_callback
);
45 // Shows the chrome app information in a native dialog box of the given |size|.
46 void ShowAppInfoInNativeDialog(gfx::NativeWindow parent
,
47 const gfx::Size
& size
,
49 const extensions::Extension
* app
,
50 const base::Closure
& close_callback
);
52 #endif // CHROME_BROWSER_UI_APPS_APP_INFO_DIALOG_H_