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

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

Issue 2814643003: Remove FrameViewBase as base class of PluginView. (Closed)
Patch Set: fix unused var 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int Y() const { return FrameRect().Y(); } 56 int Y() const { return FrameRect().Y(); }
57 int Width() const { return FrameRect().Width(); } 57 int Width() const { return FrameRect().Width(); }
58 int Height() const { return FrameRect().Height(); } 58 int Height() const { return FrameRect().Height(); }
59 IntSize size() const { return FrameRect().size(); } 59 IntSize size() const { return FrameRect().size(); }
60 IntPoint Location() const { return FrameRect().Location(); } 60 IntPoint Location() const { return FrameRect().Location(); }
61 61
62 virtual void SetFrameRect(const IntRect& frame_rect) { 62 virtual void SetFrameRect(const IntRect& frame_rect) {
63 frame_rect_ = frame_rect; 63 frame_rect_ = frame_rect;
64 } 64 }
65 const IntRect& FrameRect() const { return frame_rect_; } 65 const IntRect& FrameRect() const { return frame_rect_; }
66 IntRect BoundsRect() const { return IntRect(0, 0, Width(), Height()); }
67 66
68 void Resize(int w, int h) { SetFrameRect(IntRect(X(), Y(), w, h)); } 67 void Resize(int w, int h) { SetFrameRect(IntRect(X(), Y(), w, h)); }
69 void Resize(const IntSize& s) { SetFrameRect(IntRect(Location(), s)); } 68 void Resize(const IntSize& s) { SetFrameRect(IntRect(Location(), s)); }
70 69
71 virtual void Paint(GraphicsContext&, const CullRect&) const {} 70 virtual void Paint(GraphicsContext&, const CullRect&) const {}
72 void Invalidate() { InvalidateRect(BoundsRect()); }
73 virtual void InvalidateRect(const IntRect&) = 0;
74 71
75 virtual void Show() {} 72 virtual void Show() {}
76 virtual void Hide() {} 73 virtual void Hide() {}
77 bool IsSelfVisible() const { 74 bool IsSelfVisible() const {
78 return self_visible_; 75 return self_visible_;
79 } // Whether or not we have been explicitly marked as visible or not. 76 } // Whether or not we have been explicitly marked as visible or not.
80 bool IsParentVisible() const { 77 bool IsParentVisible() const {
81 return parent_visible_; 78 return parent_visible_;
82 } // Whether or not our parent is visible. 79 } // Whether or not our parent is visible.
83 bool IsVisible() const { 80 bool IsVisible() const {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 private: 126 private:
130 Member<FrameViewBase> parent_; 127 Member<FrameViewBase> parent_;
131 IntRect frame_rect_; 128 IntRect frame_rect_;
132 bool self_visible_; 129 bool self_visible_;
133 bool parent_visible_; 130 bool parent_visible_;
134 }; 131 };
135 132
136 } // namespace blink 133 } // namespace blink
137 134
138 #endif // FrameViewBase_h 135 #endif // FrameViewBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698