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

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

Issue 505047: Limit the size of extension views on linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: // namespace Created 11 years 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
« no previous file with comments | « no previous file | 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 "app/gfx/native_widget_types.h" 8 #include "app/gfx/native_widget_types.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/gfx/size.h" 10 #include "base/gfx/size.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
12 12
13 class Browser; 13 class Browser;
14 class ExtensionHost; 14 class ExtensionHost;
15 class RenderViewHost; 15 class RenderViewHost;
16 class RenderWidgetHostViewGtk; 16 class RenderWidgetHostViewGtk;
17 class SkBitmap; 17 class SkBitmap;
18 18
19 class ExtensionViewGtk { 19 class ExtensionViewGtk {
20 public: 20 public:
21 ExtensionViewGtk(ExtensionHost* extension_host, Browser* browser); 21 ExtensionViewGtk(ExtensionHost* extension_host, Browser* browser);
22 22
23 void Init(); 23 void Init();
24 24
25 gfx::NativeView native_view(); 25 gfx::NativeView native_view();
26 Browser* browser() const { return browser_; } 26 Browser* browser() const { return browser_; }
27 27
28 bool is_toolstrip() const { return is_toolstrip_; }
29 void set_is_toolstrip(bool is_toolstrip) { is_toolstrip_ = is_toolstrip; }
30
31 void SetBackground(const SkBitmap& background); 28 void SetBackground(const SkBitmap& background);
32 29
33 // Method for the ExtensionHost to notify us about the correct size for 30 // Method for the ExtensionHost to notify us about the correct size for
34 // extension contents. 31 // extension contents.
35 void UpdatePreferredSize(const gfx::Size& new_size); 32 void UpdatePreferredSize(const gfx::Size& new_size);
36 33
37 // Method for the ExtensionHost to notify us when the RenderViewHost has a 34 // Method for the ExtensionHost to notify us when the RenderViewHost has a
38 // connection. 35 // connection.
39 void RenderViewCreated(); 36 void RenderViewCreated();
40 37
41 RenderViewHost* render_view_host() const; 38 RenderViewHost* render_view_host() const;
42 39
43 private: 40 private:
44 void CreateWidgetHostView(); 41 void CreateWidgetHostView();
45 42
46 // True if the contents are being displayed inside the extension shelf.
47 bool is_toolstrip_;
48
49 Browser* browser_; 43 Browser* browser_;
50 44
51 ExtensionHost* extension_host_; 45 ExtensionHost* extension_host_;
52 46
53 RenderWidgetHostViewGtk* render_widget_host_view_; 47 RenderWidgetHostViewGtk* render_widget_host_view_;
54 48
55 // The background the view should have once it is initialized. This is set 49 // The background the view should have once it is initialized. This is set
56 // when the view has a custom background, but hasn't been initialized yet. 50 // when the view has a custom background, but hasn't been initialized yet.
57 SkBitmap pending_background_; 51 SkBitmap pending_background_;
58 52
59 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGtk); 53 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGtk);
60 }; 54 };
61 55
62 #endif // CHROME_BROWSER_GTK_EXTENSION_VIEW_GTK_H_ 56 #endif // CHROME_BROWSER_GTK_EXTENSION_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/extension_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698