summaryrefslogtreecommitdiffstats
path: root/apps/app_window.h
diff options
context:
space:
mode:
authormgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-30 14:34:36 +0000
committermgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-30 14:34:36 +0000
commit27df2a08ef9fff7b78a3485bdc150d9241777170 (patch)
tree7369d199f3c787275d7c5565de221f5cae2507ca /apps/app_window.h
parent945babb1f605b590a8644b2f1ec47ddfda71d573 (diff)
downloadchromium_src-27df2a08ef9fff7b78a3485bdc150d9241777170.zip
chromium_src-27df2a08ef9fff7b78a3485bdc150d9241777170.tar.gz
chromium_src-27df2a08ef9fff7b78a3485bdc150d9241777170.tar.bz2
Split out the non-app-window-specific parts of AppWindow::Delegate.
Created a new class AppDelegate and moved most of the methods of AppWindow::Delegate there (those that are not specific to app windows). This will enable custom launcher pages to reuse the same delegate without being tied to AppWindow. BUG=391137 TBR=davemoore@chromium.org Review URL: https://codereview.chromium.org/402333004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/app_window.h')
-rw-r--r--apps/app_window.h37
1 files changed, 4 insertions, 33 deletions
diff --git a/apps/app_window.h b/apps/app_window.h
index cbfab8b..151e880 100644
--- a/apps/app_window.h
+++ b/apps/app_window.h
@@ -49,6 +49,7 @@ class BaseWindow;
namespace apps {
+class AppDelegate;
class NativeAppWindow;
// Manages the web contents for app windows. The implementation for this
@@ -199,41 +200,9 @@ class AppWindow : public content::NotificationObserver,
public:
virtual ~Delegate();
- // General initialization.
- virtual void InitWebContents(content::WebContents* web_contents) = 0;
virtual NativeAppWindow* CreateNativeAppWindow(
AppWindow* window,
const CreateParams& params) = 0;
-
- // Link handling.
- virtual content::WebContents* OpenURLFromTab(
- content::BrowserContext* context,
- content::WebContents* source,
- const content::OpenURLParams& params) = 0;
- virtual void AddNewContents(content::BrowserContext* context,
- content::WebContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture,
- bool* was_blocked) = 0;
-
- // Feature support.
- virtual content::ColorChooser* ShowColorChooser(
- content::WebContents* web_contents,
- SkColor initial_color) = 0;
- virtual void RunFileChooser(content::WebContents* tab,
- const content::FileChooserParams& params) = 0;
- virtual void RequestMediaAccessPermission(
- content::WebContents* web_contents,
- const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback,
- const extensions::Extension* extension) = 0;
- virtual int PreferredIconSize() = 0;
-
- // Web contents modal dialog support.
- virtual void SetWebContentsBlocked(content::WebContents* web_contents,
- bool blocked) = 0;
- virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0;
};
// Convert draggable regions in raw format to SkRegion format. Caller is
@@ -244,8 +213,9 @@ class AppWindow : public content::NotificationObserver,
// The constructor and Init methods are public for constructing a AppWindow
// with a non-standard render interface (e.g. v1 apps using Ash Panels).
// Normally AppWindow::Create should be used.
- // The constructed app window takes ownership of |delegate|.
+ // Takes ownership of |app_delegate| and |delegate|.
AppWindow(content::BrowserContext* context,
+ AppDelegate* app_delegate,
Delegate* delegate,
const extensions::Extension* extension);
@@ -547,6 +517,7 @@ class AppWindow : public content::NotificationObserver,
scoped_ptr<NativeAppWindow> native_app_window_;
scoped_ptr<AppWindowContents> app_window_contents_;
+ scoped_ptr<AppDelegate> app_delegate_;
scoped_ptr<Delegate> delegate_;
// Manages popup windows (bubbles, tab-modals) visible overlapping the