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

Side by Side Diff: ui/views/window/dialog_client_view.cc

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ui/views/window/dialog_client_view.h ('k') | 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) 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/window/dialog_client_view.h" 5 #include "ui/views/window/dialog_client_view.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 bool DialogClientView::AcceleratorPressed(const ui::Accelerator& accelerator) { 360 bool DialogClientView::AcceleratorPressed(const ui::Accelerator& accelerator) {
361 // We only expect Escape key. 361 // We only expect Escape key.
362 DCHECK(accelerator.key_code() == ui::VKEY_ESCAPE); 362 DCHECK(accelerator.key_code() == ui::VKEY_ESCAPE);
363 Close(); 363 Close();
364 return true; 364 return true;
365 } 365 }
366 366
367 //////////////////////////////////////////////////////////////////////////////// 367 ////////////////////////////////////////////////////////////////////////////////
368 // DialogClientView, ButtonListener implementation: 368 // DialogClientView, ButtonListener implementation:
369 369
370 void DialogClientView::ButtonPressed( 370 void DialogClientView::ButtonPressed(Button* sender, const ui::Event& event) {
371 Button* sender, const views::Event& event) {
372 // We NULL check the delegate here since the buttons can receive WM_COMMAND 371 // We NULL check the delegate here since the buttons can receive WM_COMMAND
373 // messages even after they (and the window containing us) are destroyed. 372 // messages even after they (and the window containing us) are destroyed.
374 if (!GetDialogDelegate()) 373 if (!GetDialogDelegate())
375 return; 374 return;
376 375
377 if (sender == ok_button_) { 376 if (sender == ok_button_) {
378 AcceptWindow(); 377 AcceptWindow();
379 } else if (sender == cancel_button_) { 378 } else if (sender == cancel_button_) {
380 CancelWindow(); 379 CancelWindow();
381 } else { 380 } else {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 522 }
524 saved_focus_manager_ = focus_manager; 523 saved_focus_manager_ = focus_manager;
525 // Listen for focus change events so we can update the default button. 524 // Listen for focus change events so we can update the default button.
526 if (focus_manager) { 525 if (focus_manager) {
527 focus_manager->AddFocusChangeListener(this); 526 focus_manager->AddFocusChangeListener(this);
528 listening_to_focus_ = true; 527 listening_to_focus_ = true;
529 } 528 }
530 } 529 }
531 530
532 } // namespace views 531 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/dialog_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698