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

Side by Side Diff: ui/views/window/non_client_view.h

Issue 403963002: Remove remaining overrides of View::GetEventHandlerForRect() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « ui/views/view.h ('k') | ui/views/window/non_client_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ 5 #ifndef UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_
6 #define UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ 6 #define UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_
7 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 #include "ui/views/view_targeter_delegate.h" 9 #include "ui/views/view_targeter_delegate.h"
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // | | | +----------------------------------------+ | | | 128 // | | | +----------------------------------------+ | | |
129 // | | +--------------------------------------------+ | | 129 // | | +--------------------------------------------+ | |
130 // | +------------------------------------------------+ | 130 // | +------------------------------------------------+ |
131 // +----------------------------------------------------+ 131 // +----------------------------------------------------+
132 // 132 //
133 // The NonClientFrameView and ClientView are siblings because due to theme 133 // The NonClientFrameView and ClientView are siblings because due to theme
134 // changes the NonClientFrameView may be replaced with different 134 // changes the NonClientFrameView may be replaced with different
135 // implementations (e.g. during the switch from DWM/Aero-Glass to Vista Basic/ 135 // implementations (e.g. during the switch from DWM/Aero-Glass to Vista Basic/
136 // Classic rendering). 136 // Classic rendering).
137 // 137 //
138 class VIEWS_EXPORT NonClientView : public View { 138 class VIEWS_EXPORT NonClientView : public View, public ViewTargeterDelegate {
139 public: 139 public:
140 // Internal class name. 140 // Internal class name.
141 static const char kViewClassName[]; 141 static const char kViewClassName[];
142 142
143 NonClientView(); 143 NonClientView();
144 virtual ~NonClientView(); 144 virtual ~NonClientView();
145 145
146 // Returns the current NonClientFrameView instance, or NULL if 146 // Returns the current NonClientFrameView instance, or NULL if
147 // it does not exist. 147 // it does not exist.
148 NonClientFrameView* frame_view() const { return frame_view_.get(); } 148 NonClientFrameView* frame_view() const { return frame_view_.get(); }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 void SetAccessibleName(const base::string16& name); 210 void SetAccessibleName(const base::string16& name);
211 211
212 // NonClientView, View overrides: 212 // NonClientView, View overrides:
213 virtual gfx::Size GetPreferredSize() const OVERRIDE; 213 virtual gfx::Size GetPreferredSize() const OVERRIDE;
214 virtual gfx::Size GetMinimumSize() const OVERRIDE; 214 virtual gfx::Size GetMinimumSize() const OVERRIDE;
215 virtual gfx::Size GetMaximumSize() const OVERRIDE; 215 virtual gfx::Size GetMaximumSize() const OVERRIDE;
216 virtual void Layout() OVERRIDE; 216 virtual void Layout() OVERRIDE;
217 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 217 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
218 virtual const char* GetClassName() const OVERRIDE; 218 virtual const char* GetClassName() const OVERRIDE;
219 219
220 virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE;
221 virtual views::View* GetTooltipHandlerForPoint( 220 virtual views::View* GetTooltipHandlerForPoint(
222 const gfx::Point& point) OVERRIDE; 221 const gfx::Point& point) OVERRIDE;
223 222
224 protected: 223 protected:
225 // NonClientView, View overrides: 224 // NonClientView, View overrides:
226 virtual void ViewHierarchyChanged( 225 virtual void ViewHierarchyChanged(
227 const ViewHierarchyChangedDetails& details) OVERRIDE; 226 const ViewHierarchyChangedDetails& details) OVERRIDE;
228 227
229 private: 228 private:
229 // ViewTargeterDelegate:
230 virtual View* TargetForRect(View* root, const gfx::Rect& rect) OVERRIDE;
231
230 // A ClientView object or subclass, responsible for sizing the contents view 232 // A ClientView object or subclass, responsible for sizing the contents view
231 // of the window, hit testing and perhaps other tasks depending on the 233 // of the window, hit testing and perhaps other tasks depending on the
232 // implementation. 234 // implementation.
233 ClientView* client_view_; 235 ClientView* client_view_;
234 236
235 // The NonClientFrameView that renders the non-client portions of the window. 237 // The NonClientFrameView that renders the non-client portions of the window.
236 // This object is not owned by the view hierarchy because it can be replaced 238 // This object is not owned by the view hierarchy because it can be replaced
237 // dynamically as the system settings change. 239 // dynamically as the system settings change.
238 scoped_ptr<NonClientFrameView> frame_view_; 240 scoped_ptr<NonClientFrameView> frame_view_;
239 241
240 // The overlay view, when non-NULL and visible, takes up the entire widget and 242 // The overlay view, when non-NULL and visible, takes up the entire widget and
241 // is placed on top of the ClientView and NonClientFrameView. 243 // is placed on top of the ClientView and NonClientFrameView.
242 View* overlay_view_; 244 View* overlay_view_;
243 245
244 // The accessible name of this view. 246 // The accessible name of this view.
245 base::string16 accessible_name_; 247 base::string16 accessible_name_;
246 248
247 DISALLOW_COPY_AND_ASSIGN(NonClientView); 249 DISALLOW_COPY_AND_ASSIGN(NonClientView);
248 }; 250 };
249 251
250 } // namespace views 252 } // namespace views
251 253
252 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_ 254 #endif // UI_VIEWS_WINDOW_NON_CLIENT_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/view.h ('k') | ui/views/window/non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698