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

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

Issue 653843002: Mac: Attach Extension NSViews to the view hierarchy before creating renderers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DCHECK Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_view_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
7 7
8 #include "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 9
10 class Browser; 10 class Browser;
11 11
12 namespace content { 12 namespace content {
13 struct NativeWebKeyboardEvent; 13 struct NativeWebKeyboardEvent;
14 class WebContents; 14 class WebContents;
15 } 15 }
16 16
17 namespace gfx { 17 namespace gfx {
18 class Size; 18 class Size;
19 } 19 }
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 // Base class for platform-specific views used by extensions in the Chrome UI. 23 // Base class for platform-specific views used by extensions in the Chrome UI.
24 class ExtensionView { 24 class ExtensionView {
25 public: 25 public:
26 virtual ~ExtensionView() {} 26 virtual ~ExtensionView() {}
27 27
28 // Initialize the view, once a newly created view has been set in the host.
29 virtual void Init() = 0;
30
31 // If attached to a Browser (e.g. popups), the Browser it is attached to. 28 // If attached to a Browser (e.g. popups), the Browser it is attached to.
32 virtual Browser* GetBrowser() = 0; 29 virtual Browser* GetBrowser() = 0;
33 30
34 // Returns the extension's native view. 31 // Returns the extension's native view.
35 virtual gfx::NativeView GetNativeView() = 0; 32 virtual gfx::NativeView GetNativeView() = 0;
36 33
37 // Method for the ExtensionHost to notify us about the correct size for 34 // Method for the ExtensionHost to notify us about the correct size for
38 // extension contents. 35 // extension contents.
39 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) = 0; 36 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) = 0;
40 37
41 // Method for the ExtensionHost to notify us when the RenderViewHost has a 38 // Method for the ExtensionHost to notify us when the RenderViewHost has a
42 // connection. 39 // connection.
43 virtual void RenderViewCreated() = 0; 40 virtual void RenderViewCreated() = 0;
44 41
45 // Handles unhandled keyboard messages coming back from the renderer process. 42 // Handles unhandled keyboard messages coming back from the renderer process.
46 virtual void HandleKeyboardEvent( 43 virtual void HandleKeyboardEvent(
47 content::WebContents* source, 44 content::WebContents* source,
48 const content::NativeWebKeyboardEvent& event) = 0; 45 const content::NativeWebKeyboardEvent& event) = 0;
49 46
50 // Method for the ExtensionHost to notify that the extension page has loaded. 47 // Method for the ExtensionHost to notify that the extension page has loaded.
51 virtual void DidStopLoading() = 0; 48 virtual void DidStopLoading() = 0;
52 }; 49 };
53 50
54 } // namespace extensions 51 } // namespace extensions
55 52
56 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_ 53 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698