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

Side by Side Diff: chrome/browser/views/hwnd_html_view.h

Issue 99042: Fix several painting glitches for toolstrips. (Closed)
Patch Set: Review responses Created 11 years, 8 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_HWND_HTML_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_HWND_HTML_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_HWND_HTML_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_HWND_HTML_VIEW_H_
7 7
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "chrome/views/controls/hwnd_view.h" 9 #include "chrome/views/controls/hwnd_view.h"
10 #include "skia/include/SkBitmap.h" 10 #include "skia/include/SkBitmap.h"
11 11
12 class RenderViewHost; 12 class RenderViewHost;
13 class RenderViewHostDelegate; 13 class RenderViewHostDelegate;
14 class SiteInstance; 14 class SiteInstance;
15 15
16 // A simple view that wraps a RenderViewHost in an HWNDView to facilitate 16 // A simple view that wraps a RenderViewHost in an HWNDView to facilitate
17 // rendering HTML as arbitrary browser views. 17 // rendering HTML as arbitrary browser views.
18 // TODO(timsteele): (bug 1317303). This should replace DOMView. 18 // TODO(timsteele): (bug 1317303). This should replace DOMView.
19 class HWNDHtmlView : public views::HWNDView { 19 class HWNDHtmlView : public views::HWNDView {
20 public: 20 public:
21 HWNDHtmlView(const GURL& content_url, RenderViewHostDelegate* delegate, 21 HWNDHtmlView(const GURL& content_url, RenderViewHostDelegate* delegate,
22 bool allow_dom_ui_bindings, SiteInstance* instance); 22 bool allow_dom_ui_bindings, SiteInstance* instance);
23 virtual ~HWNDHtmlView(); 23 virtual ~HWNDHtmlView();
24 24
25 // View
26 virtual void SetVisible(bool is_visible);
27
28 virtual void DidChangeBounds(const gfx::Rect& previous,
29 const gfx::Rect& current);
30
31 // HWNDHtmlView
25 RenderViewHost* render_view_host() { return render_view_host_; } 32 RenderViewHost* render_view_host() { return render_view_host_; }
26 33
27 // Initialize the view without a parent window. Used for extensions that 34 // Initialize the view without a parent window. Used for extensions that
28 // don't display UI. 35 // don't display UI.
29 void InitHidden(); 36 void InitHidden();
30 37
31 // Set a custom background for the view. The background will be tiled. 38 // Set a custom background for the view. The background will be tiled.
32 void SetBackground(const SkBitmap& background); 39 virtual void SetBackground(const SkBitmap& background);
33 40
34 protected: 41 protected:
35 // View overrides. 42 // View overrides.
36 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); 43 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
37 44
38 // Called just before we create the RenderView, to give subclasses an 45 // Called just before we create the RenderView, to give subclasses an
39 // opportunity to do some setup. 46 // opportunity to do some setup.
40 virtual void CreatingRenderer() {} 47 virtual void CreatingRenderer() {}
41 48
42 SiteInstance* site_instance() { return site_instance_; } 49 SiteInstance* site_instance() { return site_instance_; }
(...skipping 22 matching lines...) Expand all
65 RenderViewHostDelegate* delegate_; 72 RenderViewHostDelegate* delegate_;
66 73
67 // The background the view should have once it is initialized. This is set 74 // The background the view should have once it is initialized. This is set
68 // when the view has a custom background, but hasn't been inititalized yet. 75 // when the view has a custom background, but hasn't been inititalized yet.
69 SkBitmap pending_background_; 76 SkBitmap pending_background_;
70 77
71 DISALLOW_EVIL_CONSTRUCTORS(HWNDHtmlView); 78 DISALLOW_EVIL_CONSTRUCTORS(HWNDHtmlView);
72 }; 79 };
73 80
74 #endif // CHROME_BROWSER_VIEWS_HWND_HTML_VIEW_H_ 81 #endif // CHROME_BROWSER_VIEWS_HWND_HTML_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698