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

Side by Side Diff: chrome/views/view.cc

Issue 27229: Attempt at fixing a FocusManager related crasher (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « no previous file | 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) 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 "chrome/views/view.h" 5 #include "chrome/views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #ifndef NDEBUG 9 #ifndef NDEBUG
10 #include <iostream> 10 #include <iostream>
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 } 1165 }
1166 return ValidateFloatingViewForID(id); 1166 return ValidateFloatingViewForID(id);
1167 } 1167 }
1168 1168
1169 void View::RestoreFloatingViewFocus() { 1169 void View::RestoreFloatingViewFocus() {
1170 // Clear the reference to the task as if we have been triggered by it, it will 1170 // Clear the reference to the task as if we have been triggered by it, it will
1171 // soon be invalid. 1171 // soon be invalid.
1172 restore_focus_view_task_ = NULL; 1172 restore_focus_view_task_ = NULL;
1173 should_restore_focus_ = false; 1173 should_restore_focus_ = false;
1174 1174
1175 GetFocusManager()->RestoreFocusedView(); 1175 FocusManager* focus_manager = GetFocusManager();
1176 if (focus_manager)
1177 focus_manager->RestoreFocusedView();
1176 } 1178 }
1177 1179
1178 // static 1180 // static
1179 bool View::EnumerateFloatingViewsForInterval(int low_bound, int high_bound, 1181 bool View::EnumerateFloatingViewsForInterval(int low_bound, int high_bound,
1180 bool ascending_order, 1182 bool ascending_order,
1181 FloatingViewPosition position, 1183 FloatingViewPosition position,
1182 int starting_id, 1184 int starting_id,
1183 int* id) { 1185 int* id) {
1184 DCHECK(low_bound <= high_bound); 1186 DCHECK(low_bound <= high_bound);
1185 if (low_bound >= high_bound) 1187 if (low_bound >= high_bound)
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 } 1596 }
1595 1597
1596 void View::DragInfo::PossibleDrag(int x, int y) { 1598 void View::DragInfo::PossibleDrag(int x, int y) {
1597 possible_drag = true; 1599 possible_drag = true;
1598 start_x = x; 1600 start_x = x;
1599 start_y = y; 1601 start_y = y;
1600 } 1602 }
1601 1603
1602 } // namespace 1604 } // namespace
1603 1605
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698