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

Side by Side Diff: views/view.cc

Issue 119237: A new menu system. (Closed) Base URL: svn://svn.chromium.org/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/view.h ('k') | views/views.gyp » ('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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 936
937 void View::RemoveAccelerator(const Accelerator& accelerator) { 937 void View::RemoveAccelerator(const Accelerator& accelerator) {
938 std::vector<Accelerator>::iterator iter; 938 std::vector<Accelerator>::iterator iter;
939 if (!accelerators_.get() || 939 if (!accelerators_.get() ||
940 ((iter = std::find(accelerators_->begin(), accelerators_->end(), 940 ((iter = std::find(accelerators_->begin(), accelerators_->end(),
941 accelerator)) == accelerators_->end())) { 941 accelerator)) == accelerators_->end())) {
942 NOTREACHED() << "Removing non-existing accelerator"; 942 NOTREACHED() << "Removing non-existing accelerator";
943 return; 943 return;
944 } 944 }
945 945
946 int index = iter - accelerators_->begin(); 946 size_t index = iter - accelerators_->begin();
947 accelerators_->erase(iter); 947 accelerators_->erase(iter);
948 if (index >= registered_accelerator_count_) { 948 if (index >= registered_accelerator_count_) {
949 // The accelerator is not registered to FocusManager. 949 // The accelerator is not registered to FocusManager.
950 return; 950 return;
951 } 951 }
952 --registered_accelerator_count_; 952 --registered_accelerator_count_;
953 953
954 RootView* root_view = GetRootView(); 954 RootView* root_view = GetRootView();
955 if (!root_view) { 955 if (!root_view) {
956 // We are not part of a view hierarchy, so there is nothing to do as we 956 // We are not part of a view hierarchy, so there is nothing to do as we
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 start_x = start_y = 0; 1392 start_x = start_y = 0;
1393 } 1393 }
1394 1394
1395 void View::DragInfo::PossibleDrag(int x, int y) { 1395 void View::DragInfo::PossibleDrag(int x, int y) {
1396 possible_drag = true; 1396 possible_drag = true;
1397 start_x = x; 1397 start_x = x;
1398 start_y = y; 1398 start_y = y;
1399 } 1399 }
1400 1400
1401 } // namespace 1401 } // namespace
OLDNEW
« no previous file with comments | « views/view.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698