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

Side by Side Diff: views/view.cc

Issue 140023: Reverting 18872. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « views/focus/focus_manager_win.cc ('k') | views/view_unittest.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #ifndef NDEBUG 8 #ifndef NDEBUG
9 #include <iostream> 9 #include <iostream>
10 #endif 10 #endif
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 bool View::IsFocusable() const { 259 bool View::IsFocusable() const {
260 return focusable_ && enabled_ && is_visible_; 260 return focusable_ && enabled_ && is_visible_;
261 } 261 }
262 262
263 void View::SetFocusable(bool focusable) { 263 void View::SetFocusable(bool focusable) {
264 focusable_ = focusable; 264 focusable_ = focusable;
265 } 265 }
266 266
267 FocusManager* View::GetFocusManager() {
268 Widget* widget = GetWidget();
269 return widget ? widget->GetFocusManager() : NULL;
270 }
271
272 bool View::HasFocus() { 267 bool View::HasFocus() {
273 FocusManager* focus_manager = GetFocusManager(); 268 FocusManager* focus_manager = GetFocusManager();
274 if (focus_manager) 269 if (focus_manager)
275 return focus_manager->GetFocusedView() == this; 270 return focus_manager->GetFocusedView() == this;
276 return false; 271 return false;
277 } 272 }
278 273
279 void View::SetHotTracked(bool flag) { 274 void View::SetHotTracked(bool flag) {
280 } 275 }
281 276
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 start_x = start_y = 0; 1392 start_x = start_y = 0;
1398 } 1393 }
1399 1394
1400 void View::DragInfo::PossibleDrag(int x, int y) { 1395 void View::DragInfo::PossibleDrag(int x, int y) {
1401 possible_drag = true; 1396 possible_drag = true;
1402 start_x = x; 1397 start_x = x;
1403 start_y = y; 1398 start_y = y;
1404 } 1399 }
1405 1400
1406 } // namespace 1401 } // namespace
OLDNEW
« no previous file with comments | « views/focus/focus_manager_win.cc ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698