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

Unified Diff: ui/views/window/dialog_client_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 | « ui/views/window/dialog_client_view.h ('k') | views/accelerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index f0abe6f5a662e09cc19fec3ff419d4c10d04aa84..6cf9caa5fd1614d2a4a5e28154f23eb862681492 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -77,7 +77,7 @@ class DialogButton : public NativeTextButton {
}
// Overridden to forward to the delegate.
- virtual bool AcceleratorPressed(const Accelerator& accelerator) {
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) {
if (!owner_->widget_delegate()->AsDialogDelegate()->
AreAcceleratorsEnabled(type_)) {
return false;
@@ -142,8 +142,8 @@ void DialogClientView::ShowDialogButtons() {
if (is_default_button)
default_button_ = ok_button_;
if (!(buttons & ui::DIALOG_BUTTON_CANCEL))
- ok_button_->AddAccelerator(Accelerator(ui::VKEY_ESCAPE,
- false, false, false));
+ ok_button_->AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE,
+ false, false, false));
AddChildView(ok_button_);
}
if (buttons & ui::DIALOG_BUTTON_CANCEL && !cancel_button_) {
@@ -165,8 +165,8 @@ void DialogClientView::ShowDialogButtons() {
label,
is_default_button);
cancel_button_->SetGroup(kButtonGroup);
- cancel_button_->AddAccelerator(Accelerator(ui::VKEY_ESCAPE,
- false, false, false));
+ cancel_button_->AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE,
+ false, false, false));
if (is_default_button)
default_button_ = ok_button_;
AddChildView(cancel_button_);
@@ -174,7 +174,7 @@ void DialogClientView::ShowDialogButtons() {
if (!buttons) {
// Register the escape key as an accelerator which will close the window
// if there are no dialog buttons.
- AddAccelerator(Accelerator(ui::VKEY_ESCAPE, false, false, false));
+ AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, false, false, false));
}
}
@@ -406,7 +406,7 @@ gfx::Size DialogClientView::GetPreferredSize() {
return prefsize;
}
-bool DialogClientView::AcceleratorPressed(const Accelerator& accelerator) {
+bool DialogClientView::AcceleratorPressed(const ui::Accelerator& accelerator) {
// We only expect Escape key.
DCHECK(accelerator.key_code() == ui::VKEY_ESCAPE);
Close();
« no previous file with comments | « ui/views/window/dialog_client_view.h ('k') | views/accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698