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

Side by Side Diff: third_party/WebKit/Source/platform/FrameViewBase.h

Issue 2797943002: Set plugin focus via element dispatch (Closed)
Patch Set: Set plugin focus after dispatching DOM events and making sure focus has not changed. Created 3 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 /* 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 FrameViewBase_h 28 #ifndef FrameViewBase_h
29 #define FrameViewBase_h 29 #define FrameViewBase_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"
36 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
37 36
38 namespace blink { 37 namespace blink {
39 38
40 class CullRect; 39 class CullRect;
41 class Event; 40 class Event;
42 class GraphicsContext; 41 class GraphicsContext;
43 42
44 // The FrameViewBase class serves as a base class for FrameView, Scrollbar, and 43 // The FrameViewBase class serves as a base class for FrameView, Scrollbar, and
45 // PluginView. 44 // PluginView.
(...skipping 20 matching lines...) Expand all
66 const IntRect& frameRect() const { return m_frameRect; } 65 const IntRect& frameRect() const { return m_frameRect; }
67 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); } 66 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); }
68 67
69 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); } 68 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); }
70 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); } 69 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); }
71 70
72 virtual void paint(GraphicsContext&, const CullRect&) const {} 71 virtual void paint(GraphicsContext&, const CullRect&) const {}
73 void invalidate() { invalidateRect(boundsRect()); } 72 void invalidate() { invalidateRect(boundsRect()); }
74 virtual void invalidateRect(const IntRect&) = 0; 73 virtual void invalidateRect(const IntRect&) = 0;
75 74
76 virtual void setFocused(bool, WebFocusType) {}
77
78 virtual void show() {} 75 virtual void show() {}
79 virtual void hide() {} 76 virtual void hide() {}
80 bool isSelfVisible() const { 77 bool isSelfVisible() const {
81 return m_selfVisible; 78 return m_selfVisible;
82 } // Whether or not we have been explicitly marked as visible or not. 79 } // Whether or not we have been explicitly marked as visible or not.
83 bool isParentVisible() const { 80 bool isParentVisible() const {
84 return m_parentVisible; 81 return m_parentVisible;
85 } // Whether or not our parent is visible. 82 } // Whether or not our parent is visible.
86 bool isVisible() const { 83 bool isVisible() const {
87 return m_selfVisible && m_parentVisible; 84 return m_selfVisible && m_parentVisible;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 private: 129 private:
133 Member<FrameViewBase> m_parent; 130 Member<FrameViewBase> m_parent;
134 IntRect m_frameRect; 131 IntRect m_frameRect;
135 bool m_selfVisible; 132 bool m_selfVisible;
136 bool m_parentVisible; 133 bool m_parentVisible;
137 }; 134 };
138 135
139 } // namespace blink 136 } // namespace blink
140 137
141 #endif // FrameViewBase_h 138 #endif // FrameViewBase_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/plugins/PluginView.h ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698