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

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

Issue 2832883003: Remove unneeded Convert* methods and move many from FrameViewBase to FrameView (Closed)
Patch Set: remove scrollbar convert methods 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual bool IsPluginView() const { return false; } 82 virtual bool IsPluginView() const { return false; }
83 virtual bool IsPluginContainer() const { return false; } 83 virtual bool IsPluginContainer() const { return false; }
84 virtual bool IsScrollbar() const { return false; } 84 virtual bool IsScrollbar() const { return false; }
85 85
86 virtual void SetParent(FrameViewBase*); 86 virtual void SetParent(FrameViewBase*);
87 FrameViewBase* Parent() const { return parent_; } 87 FrameViewBase* Parent() const { return parent_; }
88 FrameViewBase* Root() const; 88 FrameViewBase* Root() const;
89 89
90 virtual void HandleEvent(Event*) {} 90 virtual void HandleEvent(Event*) {}
91 91
92 IntRect ConvertToRootFrame(const IntRect&) const; 92 // ConvertFromRootFrame must be in FrameViewBase rather than FrameView
93 // to be visible to Scrollbar::ConvertFromRootFrame and
94 // RemoteFrameView::UpdateRemoteViewportIntersection. The related
95 // ConvertFromContainingFrameViewBase must be declared locally to be visible.
93 IntRect ConvertFromRootFrame(const IntRect&) const; 96 IntRect ConvertFromRootFrame(const IntRect&) const;
94
95 IntPoint ConvertToRootFrame(const IntPoint&) const;
96 IntPoint ConvertFromRootFrame(const IntPoint&) const; 97 IntPoint ConvertFromRootFrame(const IntPoint&) const;
97 FloatPoint ConvertFromRootFrame(const FloatPoint&) const; 98 FloatPoint ConvertFromRootFrame(const FloatPoint&) const;
99 virtual IntRect ConvertFromContainingFrameViewBase(
100 const IntRect& parent_rect) const {
101 return parent_rect;
102 }
103 virtual IntPoint ConvertFromContainingFrameViewBase(
104 const IntPoint& parent_point) const {
105 return parent_point;
106 }
98 107
99 virtual void FrameRectsChanged() {} 108 virtual void FrameRectsChanged() {}
100 109
101 virtual void GeometryMayHaveChanged() {} 110 virtual void GeometryMayHaveChanged() {}
102 111
103 virtual IntRect ConvertToContainingFrameViewBase(const IntRect&) const;
104 virtual IntRect ConvertFromContainingFrameViewBase(const IntRect&) const;
105 virtual IntPoint ConvertToContainingFrameViewBase(const IntPoint&) const;
106 virtual IntPoint ConvertFromContainingFrameViewBase(const IntPoint&) const;
107
108 // Virtual methods to convert points to/from child frameviewbases.
109 virtual IntPoint ConvertChildToSelf(const FrameViewBase*,
110 const IntPoint&) const;
111 virtual IntPoint ConvertSelfToChild(const FrameViewBase*,
112 const IntPoint&) const;
113
114 // Notifies this frameviewbase that it will no longer be receiving events. 112 // Notifies this frameviewbase that it will no longer be receiving events.
115 virtual void EventListenersRemoved() {} 113 virtual void EventListenersRemoved() {}
116 114
117 DECLARE_VIRTUAL_TRACE(); 115 DECLARE_VIRTUAL_TRACE();
118 virtual void Dispose() {} 116 virtual void Dispose() {}
119 117
120 private: 118 private:
121 Member<FrameViewBase> parent_; 119 Member<FrameViewBase> parent_;
122 IntRect frame_rect_; 120 IntRect frame_rect_;
123 bool self_visible_; 121 bool self_visible_;
124 bool parent_visible_; 122 bool parent_visible_;
125 }; 123 };
126 124
127 } // namespace blink 125 } // namespace blink
128 126
129 #endif // FrameViewBase_h 127 #endif // FrameViewBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698