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

Side by Side Diff: chrome/browser/extensions/extension_view.h

Issue 10913243: extensions: Add ExtensionView interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for Ben Created 8 years, 3 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 (c) 2012 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
7
8 #include "ui/gfx/native_widget_types.h"
9
10 class Browser;
11 class ExtensionViewContainer;
12
13 namespace content {
14 class RenderViewHost;
15 }
16
17 namespace extensions {
18 class ExtensionHost;
19 }
20
21 namespace gfx {
22 class Size;
23 }
24
25 // This is a cross platform interface for extension view, and it's owned by
26 // ExtensionHost.
27 class ExtensionView {
28 public:
29 static ExtensionView* Create(extensions::ExtensionHost* host,
30 Browser* browser);
31
32 virtual ~ExtensionView() {}
33
34 // Returns the browser the extension belongs to.
35 virtual Browser* GetBrowser() = 0;
36 virtual const Browser* GetBrowser() const = 0;
37
38 // Returns the extension's native view.
39 virtual gfx::NativeView GetNativeView() = 0;
40
41 // Returns the render view host for this extension view.
42 virtual content::RenderViewHost* GetRenderViewHost() const = 0;
43
44 // Sets the container for this view.
45 virtual void SetContainer(ExtensionViewContainer* container) = 0;
46
47 // Used by ExtensionHost to notify the platform-specific implementations about
48 // the correct size for extension contents.
49 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) = 0;
50
51 // Used by ExtensionHost to notify the platform-specific implementations when
52 // the RenderViewHost has a connection.
53 virtual void RenderViewCreated() = 0;
54
55 // Used by ExtensionHost to notify the platform-specific implementations that/
56 // the extension page is loaded.
57 virtual void DidStopLoading() = 0;
58
59 // Informs the view that its containing window's frame changed.
60 virtual void WindowFrameChanged() = 0;
61 };
62
63 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698