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

Side by Side Diff: apps/custom_launcher_page_contents.h

Issue 365013003: Experimental app list: Custom launcher pages have app APIs and style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use PAGE_TRANSITION_AUTO_TOPLEVEL instead of PAGE_TRANSITION_LINK. Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_
6 #define APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "extensions/browser/extension_function_dispatcher.h"
11
12 class GURL;
tapted 2014/07/10 04:29:34 this is a data member, so should probably have an
Matt Giuca 2014/07/10 07:37:03 Done (latter).
13
14 namespace content {
15 class BrowserContext;
16 }
17
18 namespace apps {
19
20 // Manages the web contents for extension-hosted launcher pages. The
21 // implementation for this class should create and maintain the WebContents for
22 // the page, and handle any message passing between the web contents and the
23 // extension system.
24 class CustomLauncherPageContents
25 : public content::WebContentsObserver,
26 public extensions::ExtensionFunctionDispatcher::Delegate {
27 public:
28 CustomLauncherPageContents();
29 virtual ~CustomLauncherPageContents();
30
31 // Called to initialize the WebContents, before the app window is created.
32 void Initialize(content::BrowserContext* context, const GURL& url);
33
34 // Called to load the contents, after the app window is created.
35 void LoadContents();
36
37 content::WebContents* GetWebContents() const;
tapted 2014/07/10 04:29:34 nit: use a hacker_style inline accessor? Or call G
Matt Giuca 2014/07/10 07:37:03 Done.
38
39 private:
40 // content::WebContentsObserver
tapted 2014/07/10 04:29:34 nit: I usualy see a colon after these
Matt Giuca 2014/07/10 07:37:03 Done.
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
42
43 // extensions::ExtensionFunctionDispatcher::Delegate
44 virtual extensions::WindowController* GetExtensionWindowController()
45 const OVERRIDE;
46 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
47
48 void OnRequest(const ExtensionHostMsg_Request_Params& params);
49
50 GURL url_;
51 scoped_ptr<content::WebContents> web_contents_;
52 scoped_ptr<extensions::ExtensionFunctionDispatcher>
53 extension_function_dispatcher_;
54
55 DISALLOW_COPY_AND_ASSIGN(CustomLauncherPageContents);
56 };
57
58 } // namespace apps
59
60 #endif // APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698