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

Side by Side Diff: chrome/browser/gtk/extension_view_gtk.h

Issue 174585: Draw background of Linux extension toolstrips. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « chrome/browser/gtk/extension_shelf_gtk.cc ('k') | chrome/browser/gtk/extension_view_gtk.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_EXTENSION_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_EXTENSION_VIEW_GTK_H_
6 #define CHROME_BROWSER_GTK_EXTENSION_VIEW_GTK_H_ 6 #define CHROME_BROWSER_GTK_EXTENSION_VIEW_GTK_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/gfx/native_widget_types.h" 9 #include "base/gfx/native_widget_types.h"
10 10
11 class Browser; 11 class Browser;
12 class ExtensionHost; 12 class ExtensionHost;
13 class RenderViewHost; 13 class RenderViewHost;
14 class RenderWidgetHostViewGtk; 14 class RenderWidgetHostViewGtk;
15 class SkBitmap;
15 16
16 class ExtensionViewGtk { 17 class ExtensionViewGtk {
17 public: 18 public:
18 ExtensionViewGtk(ExtensionHost* extension_host, Browser* browser); 19 ExtensionViewGtk(ExtensionHost* extension_host, Browser* browser);
19 20
20 void Init(); 21 void Init();
21 22
22 gfx::NativeView native_view(); 23 gfx::NativeView native_view();
23 Browser* browser() const { return browser_; } 24 Browser* browser() const { return browser_; }
24 25
25 bool is_toolstrip() const { return is_toolstrip_; } 26 bool is_toolstrip() const { return is_toolstrip_; }
26 void set_is_toolstrip(bool is_toolstrip) { is_toolstrip_ = is_toolstrip; } 27 void set_is_toolstrip(bool is_toolstrip) { is_toolstrip_ = is_toolstrip; }
27 28
29 void SetBackground(const SkBitmap& background);
30
28 // Method for the ExtensionHost to notify us about the correct width for 31 // Method for the ExtensionHost to notify us about the correct width for
29 // extension contents. 32 // extension contents.
30 void UpdatePreferredWidth(int pref_width); 33 void UpdatePreferredWidth(int pref_width);
31 34
32 private: 35 private:
33 RenderViewHost* render_view_host() const; 36 RenderViewHost* render_view_host() const;
34 37
35 void CreateWidgetHostView(); 38 void CreateWidgetHostView();
36 39
37 // True if the contents are being displayed inside the extension shelf. 40 // True if the contents are being displayed inside the extension shelf.
38 bool is_toolstrip_; 41 bool is_toolstrip_;
39 42
40 Browser* browser_; 43 Browser* browser_;
41 44
42 ExtensionHost* extension_host_; 45 ExtensionHost* extension_host_;
43 46
44 RenderWidgetHostViewGtk* render_widget_host_view_; 47 RenderWidgetHostViewGtk* render_widget_host_view_;
45 48
46 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGtk); 49 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGtk);
47 }; 50 };
48 51
49 #endif // CHROME_BROWSER_GTK_EXTENSION_VIEW_GTK_H_ 52 #endif // CHROME_BROWSER_GTK_EXTENSION_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/extension_shelf_gtk.cc ('k') | chrome/browser/gtk/extension_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698