Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / extensions / extension_view.h
blobdfccc94d0fbebebd3be62d2a820a02c789a7ea86
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_EXTENSIONS_EXTENSION_VIEW_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_
8 #include "ui/gfx/native_widget_types.h"
10 class Browser;
12 namespace content {
13 struct NativeWebKeyboardEvent;
14 class RenderViewHost;
15 class WebContents;
18 namespace gfx {
19 class Size;
22 namespace extensions {
24 // Base class for platform-specific views used by extensions in the Chrome UI.
25 class ExtensionView {
26 public:
27 virtual ~ExtensionView() {}
29 // If attached to a Browser (e.g. popups), the Browser it is attached to.
30 virtual Browser* GetBrowser() = 0;
32 // Returns the extension's native view.
33 virtual gfx::NativeView GetNativeView() = 0;
35 // Method for the ExtensionHost to notify us about the correct size for
36 // extension contents.
37 virtual void ResizeDueToAutoResize(content::WebContents* web_contents,
38 const gfx::Size& new_size) = 0;
40 // Method for the ExtensionHost to notify us when the RenderViewHost has a
41 // connection.
42 virtual void RenderViewCreated(content::RenderViewHost* render_view_host) = 0;
44 // Handles unhandled keyboard messages coming back from the renderer process.
45 virtual void HandleKeyboardEvent(
46 content::WebContents* source,
47 const content::NativeWebKeyboardEvent& event) = 0;
49 // Method for the ExtensionHost to notify that the extension page has loaded.
50 virtual void DidStopLoading() = 0;
53 } // namespace extensions
55 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_H_