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

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

Issue 10377114: Remove some more OS_CHROMEOS from browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
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/view.h" 5 #include "ui/views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 // MousePressed. 855 // MousePressed.
856 return OnGestureEvent(event); 856 return OnGestureEvent(event);
857 } 857 }
858 858
859 // Accelerators ---------------------------------------------------------------- 859 // Accelerators ----------------------------------------------------------------
860 860
861 void View::AddAccelerator(const ui::Accelerator& accelerator) { 861 void View::AddAccelerator(const ui::Accelerator& accelerator) {
862 if (!accelerators_.get()) 862 if (!accelerators_.get())
863 accelerators_.reset(new std::vector<ui::Accelerator>()); 863 accelerators_.reset(new std::vector<ui::Accelerator>());
864 864
865 DCHECK(std::find(accelerators_->begin(), accelerators_->end(), accelerator) == 865 if (std::find(accelerators_->begin(), accelerators_->end(), accelerator) ==
866 accelerators_->end()) 866 accelerators_->end()) {
867 << "Registering the same accelerator multiple times"; 867 accelerators_->push_back(accelerator);
868 868 }
869 accelerators_->push_back(accelerator);
870 RegisterPendingAccelerators(); 869 RegisterPendingAccelerators();
871 } 870 }
872 871
873 void View::RemoveAccelerator(const ui::Accelerator& accelerator) { 872 void View::RemoveAccelerator(const ui::Accelerator& accelerator) {
874 if (!accelerators_.get()) { 873 if (!accelerators_.get()) {
875 NOTREACHED() << "Removing non-existing accelerator"; 874 NOTREACHED() << "Removing non-existing accelerator";
876 return; 875 return;
877 } 876 }
878 877
879 std::vector<ui::Accelerator>::iterator i( 878 std::vector<ui::Accelerator>::iterator i(
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 gfx::Point widget_location(event.location()); 2065 gfx::Point widget_location(event.location());
2067 ConvertPointToWidget(this, &widget_location); 2066 ConvertPointToWidget(this, &widget_location);
2068 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); 2067 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations);
2069 return true; 2068 return true;
2070 #else 2069 #else
2071 return false; 2070 return false;
2072 #endif // !defined(OS_MACOSX) 2071 #endif // !defined(OS_MACOSX)
2073 } 2072 }
2074 2073
2075 } // namespace views 2074 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698