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

Unified Diff: views/view.cc

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/view.h ('k') | views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.cc
diff --git a/views/view.cc b/views/view.cc
index 698cabad83bcbe81736add3390627dd74f52b546..1539cc505bd522f681ac5e32bc767fbc4dc84263 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -804,9 +804,9 @@ InputMethod* View::GetInputMethod() {
// Accelerators ----------------------------------------------------------------
-void View::AddAccelerator(const Accelerator& accelerator) {
+void View::AddAccelerator(const ui::Accelerator& accelerator) {
if (!accelerators_.get())
- accelerators_.reset(new std::vector<Accelerator>());
+ accelerators_.reset(new std::vector<ui::Accelerator>());
DCHECK(std::find(accelerators_->begin(), accelerators_->end(), accelerator) ==
accelerators_->end())
@@ -816,13 +816,13 @@ void View::AddAccelerator(const Accelerator& accelerator) {
RegisterPendingAccelerators();
}
-void View::RemoveAccelerator(const Accelerator& accelerator) {
+void View::RemoveAccelerator(const ui::Accelerator& accelerator) {
if (!accelerators_.get()) {
NOTREACHED() << "Removing non-existing accelerator";
return;
}
- std::vector<Accelerator>::iterator i(
+ std::vector<ui::Accelerator>::iterator i(
std::find(accelerators_->begin(), accelerators_->end(), accelerator));
if (i == accelerators_->end()) {
NOTREACHED() << "Removing non-existing accelerator";
@@ -848,7 +848,7 @@ void View::ResetAccelerators() {
UnregisterAccelerators(false);
}
-bool View::AcceleratorPressed(const Accelerator& accelerator) {
+bool View::AcceleratorPressed(const ui::Accelerator& accelerator) {
return false;
}
@@ -1961,7 +1961,7 @@ void View::RegisterPendingAccelerators() {
// Only register accelerators if we are visible.
if (!IsVisibleInRootView() || !GetWidget()->IsVisible())
return;
- for (std::vector<Accelerator>::const_iterator i(
+ for (std::vector<ui::Accelerator>::const_iterator i(
accelerators_->begin() + registered_accelerator_count_);
i != accelerators_->end(); ++i) {
accelerator_focus_manager_->RegisterAccelerator(*i, this);
« no previous file with comments | « views/view.h ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698