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

Side by Side Diff: Source/platform/Widget.h

Issue 852083002: Propagate focus type to plugins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved Created 5 years, 11 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/svg/SVGAElement.cpp ('k') | Source/web/ChromeClientImpl.h » ('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) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008 Collabora Ltd. All rights reserved. 3 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #ifndef Widget_h 28 #ifndef Widget_h
29 #define Widget_h 29 #define Widget_h
30 30
31 #include "platform/PlatformExport.h" 31 #include "platform/PlatformExport.h"
32 #include "platform/geometry/FloatPoint.h" 32 #include "platform/geometry/FloatPoint.h"
33 #include "platform/geometry/IntRect.h" 33 #include "platform/geometry/IntRect.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "public/platform/WebFocusType.h"
35 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
36 #include "wtf/RefCounted.h" 37 #include "wtf/RefCounted.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 class Event; 41 class Event;
41 class GraphicsContext; 42 class GraphicsContext;
42 class HostWindow; 43 class HostWindow;
43 44
44 // The Widget class serves as a base class for FrameView, Scrollbar, and PluginV iew. 45 // The Widget class serves as a base class for FrameView, Scrollbar, and PluginV iew.
(...skipping 19 matching lines...) Expand all
64 65
65 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); } 66 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); }
66 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); } 67 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); }
67 void move(int x, int y) { setFrameRect(IntRect(x, y, width(), height())); } 68 void move(int x, int y) { setFrameRect(IntRect(x, y, width(), height())); }
68 void move(const IntPoint& p) { setFrameRect(IntRect(p, size())); } 69 void move(const IntPoint& p) { setFrameRect(IntRect(p, size())); }
69 70
70 virtual void paint(GraphicsContext*, const IntRect&) { } 71 virtual void paint(GraphicsContext*, const IntRect&) { }
71 void invalidate() { invalidateRect(boundsRect()); } 72 void invalidate() { invalidateRect(boundsRect()); }
72 virtual void invalidateRect(const IntRect&) = 0; 73 virtual void invalidateRect(const IntRect&) = 0;
73 74
74 virtual void setFocus(bool) { } 75 virtual void setFocus(bool, WebFocusType) { }
75 76
76 virtual void show() { } 77 virtual void show() { }
77 virtual void hide() { } 78 virtual void hide() { }
78 bool isSelfVisible() const { return m_selfVisible; } // Whether or not we ha ve been explicitly marked as visible or not. 79 bool isSelfVisible() const { return m_selfVisible; } // Whether or not we ha ve been explicitly marked as visible or not.
79 bool isParentVisible() const { return m_parentVisible; } // Whether or not o ur parent is visible. 80 bool isParentVisible() const { return m_parentVisible; } // Whether or not o ur parent is visible.
80 bool isVisible() const { return m_selfVisible && m_parentVisible; } // Wheth er or not we are actually visible. 81 bool isVisible() const { return m_selfVisible && m_parentVisible; } // Wheth er or not we are actually visible.
81 virtual void setParentVisible(bool visible) { m_parentVisible = visible; } 82 virtual void setParentVisible(bool visible) { m_parentVisible = visible; }
82 void setSelfVisible(bool v) { m_selfVisible = v; } 83 void setSelfVisible(bool v) { m_selfVisible = v; }
83 84
84 virtual bool isFrameView() const { return false; } 85 virtual bool isFrameView() const { return false; }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 private: 131 private:
131 RawPtrWillBeMember<Widget> m_parent; 132 RawPtrWillBeMember<Widget> m_parent;
132 IntRect m_frame; 133 IntRect m_frame;
133 bool m_selfVisible; 134 bool m_selfVisible;
134 bool m_parentVisible; 135 bool m_parentVisible;
135 }; 136 };
136 137
137 } // namespace blink 138 } // namespace blink
138 139
139 #endif // Widget_h 140 #endif // Widget_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAElement.cpp ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698