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

Side by Side Diff: Source/core/rendering/RenderWidget.h

Issue 23618022: BrowserPlugin/WebView - Move plugin lifetime to DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Handle shared-renderer case. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderPart.cpp ('k') | Source/core/rendering/RenderWidget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2009, 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 13 matching lines...) Expand all
24 24
25 #include "core/rendering/RenderReplaced.h" 25 #include "core/rendering/RenderReplaced.h"
26 #include "platform/Widget.h" 26 #include "platform/Widget.h"
27 27
28 namespace WebCore { 28 namespace WebCore {
29 29
30 class RenderWidget : public RenderReplaced { 30 class RenderWidget : public RenderReplaced {
31 public: 31 public:
32 virtual ~RenderWidget(); 32 virtual ~RenderWidget();
33 33
34 Widget* widget() const { return m_widget.get(); } 34 Widget* widget() const;
35 virtual void setWidget(PassRefPtr<Widget>);
36 35
36 void updateOnWidgetChange();
37 void updateWidgetPosition(); 37 void updateWidgetPosition();
38 void widgetPositionsUpdated(); 38 void widgetPositionsUpdated();
39 39
40 void setIsOverlapped(bool); 40 void setIsOverlapped(bool);
41 41
42 void ref() { ++m_refCount; } 42 void ref() { ++m_refCount; }
43 void deref(); 43 void deref();
44 44
45 class UpdateSuspendScope { 45 virtual bool isWidget() const OVERRIDE FINAL { return true; }
46 public: 46 bool updateWidgetGeometry();
47 UpdateSuspendScope();
48 ~UpdateSuspendScope();
49 };
50 47
51 protected: 48 protected:
52 explicit RenderWidget(Element*); 49 explicit RenderWidget(Element*);
53 50
54 void clearWidget();
55
56 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE FINAL; 51 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE FINAL;
57 virtual void layout() OVERRIDE; 52 virtual void layout() OVERRIDE;
58 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; 53 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
59 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const OVERRID E FINAL; 54 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const OVERRID E FINAL;
60 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE; 55 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE;
61 56
62 virtual void paintContents(PaintInfo&, const LayoutPoint&); 57 virtual void paintContents(PaintInfo&, const LayoutPoint&);
63 58
64 private: 59 private:
65 virtual bool isWidget() const OVERRIDE FINAL { return true; }
66
67 virtual void willBeDestroyed() OVERRIDE FINAL; 60 virtual void willBeDestroyed() OVERRIDE FINAL;
68 virtual void destroy() OVERRIDE FINAL; 61 virtual void destroy() OVERRIDE FINAL;
69 62
70 bool setWidgetGeometry(const LayoutRect&); 63 bool setWidgetGeometry(const LayoutRect&);
71 bool updateWidgetGeometry();
72 64
73 RefPtr<Widget> m_widget;
74 int m_refCount; 65 int m_refCount;
75 }; 66 };
76 67
77 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderWidget, isWidget()); 68 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderWidget, isWidget());
78 69
79 } // namespace WebCore 70 } // namespace WebCore
80 71
81 #endif // RenderWidget_h 72 #endif // RenderWidget_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderPart.cpp ('k') | Source/core/rendering/RenderWidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698