Disable TabDragController tests that fail with a real compositor.
[chromium-blink-merge.git] / chrome / browser / ui / gtk / extensions / extension_view_gtk.h
blob97cdd80b24f6c4be733822f4bfcd251d7e21f9f4
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.
5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_
8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/gfx/native_widget_types.h"
11 #include "ui/gfx/size.h"
13 class Browser;
14 class SkBitmap;
16 namespace content {
17 class RenderViewHost;
20 namespace extensions {
21 class ExtensionHost;
24 class ExtensionViewGtk {
25 public:
26 ExtensionViewGtk(extensions::ExtensionHost* extension_host, Browser* browser);
28 class Container {
29 public:
30 virtual ~Container() {}
31 virtual void OnExtensionSizeChanged(ExtensionViewGtk* view,
32 const gfx::Size& new_size) {}
35 void Init();
37 gfx::NativeView native_view();
38 Browser* browser() const { return browser_; }
40 void SetBackground(const SkBitmap& background);
42 // Sets the container for this view.
43 void SetContainer(Container* container) { container_ = container; }
45 // Method for the ExtensionHost to notify us about the correct size for
46 // extension contents.
47 void ResizeDueToAutoResize(const gfx::Size& new_size);
49 // Method for the ExtensionHost to notify us when the RenderViewHost has a
50 // connection.
51 void RenderViewCreated();
53 content::RenderViewHost* render_view_host() const;
55 private:
56 void CreateWidgetHostView();
58 Browser* browser_;
60 extensions::ExtensionHost* extension_host_;
62 // The background the view should have once it is initialized. This is set
63 // when the view has a custom background, but hasn't been initialized yet.
64 SkBitmap pending_background_;
66 // This view's container.
67 Container* container_;
69 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGtk);
72 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_EXTENSION_VIEW_GTK_H_