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

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

Issue 10828265: Replace views::LocatedEvent with ui::LocatedEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/widget/tooltip_manager_win.cc ('k') | no next file » | 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 #include "ui/views/window/non_client_view.h" 5 #include "ui/views/window/non_client_view.h"
6 6
7 #include "ui/base/accessibility/accessible_view_state.h" 7 #include "ui/base/accessibility/accessible_view_state.h"
8 #include "ui/base/hit_test.h" 8 #include "ui/base/hit_test.h"
9 #include "ui/views/widget/root_view.h" 9 #include "ui/views/widget/root_view.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // view visually (as it does for the browser window), then it will eat mouse 170 // view visually (as it does for the browser window), then it will eat mouse
171 // events for the window controls. We override this method here so that we can 171 // events for the window controls. We override this method here so that we can
172 // detect this condition and re-route the events to the non-client frame view. 172 // detect this condition and re-route the events to the non-client frame view.
173 // The assumption is that the frame view's implementation of HitTest will only 173 // The assumption is that the frame view's implementation of HitTest will only
174 // return true for area not occupied by the client view. 174 // return true for area not occupied by the client view.
175 if (frame_view_->parent() == this) { 175 if (frame_view_->parent() == this) {
176 // During the reset of the frame_view_ it's possible to be in this code 176 // During the reset of the frame_view_ it's possible to be in this code
177 // after it's been removed from the view hierarchy but before it's been 177 // after it's been removed from the view hierarchy but before it's been
178 // removed from the NonClientView. 178 // removed from the NonClientView.
179 gfx::Point point_in_child_coords(point); 179 gfx::Point point_in_child_coords(point);
180 View::ConvertPointToView(this, frame_view_.get(), &point_in_child_coords); 180 View::ConvertPointToTarget(this, frame_view_.get(), &point_in_child_coords);
181 if (frame_view_->HitTestPoint(point_in_child_coords)) 181 if (frame_view_->HitTestPoint(point_in_child_coords))
182 return frame_view_->GetEventHandlerForPoint(point_in_child_coords); 182 return frame_view_->GetEventHandlerForPoint(point_in_child_coords);
183 } 183 }
184 184
185 return View::GetEventHandlerForPoint(point); 185 return View::GetEventHandlerForPoint(point);
186 } 186 }
187 187
188 //////////////////////////////////////////////////////////////////////////////// 188 ////////////////////////////////////////////////////////////////////////////////
189 // NonClientFrameView, public: 189 // NonClientFrameView, public:
190 190
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 std::string NonClientFrameView::GetClassName() const { 272 std::string NonClientFrameView::GetClassName() const {
273 return kViewClassName; 273 return kViewClassName;
274 } 274 }
275 275
276 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 276 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
277 // Overridden to do nothing. The NonClientView manually calls Layout on the 277 // Overridden to do nothing. The NonClientView manually calls Layout on the
278 // FrameView when it is itself laid out, see comment in NonClientView::Layout. 278 // FrameView when it is itself laid out, see comment in NonClientView::Layout.
279 } 279 }
280 280
281 } // namespace views 281 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/tooltip_manager_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698