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

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

Issue 119183: Fix crash 12519: in views::DialogClientView::AcceptWindow()... (Closed) Base URL: svn://chrome-svn/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 | « no previous file | 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) 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/window/dialog_client_view.h" 5 #include "views/window/dialog_client_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <uxtheme.h> 9 #include <uxtheme.h>
10 #include <vsstyle.h> 10 #include <vsstyle.h>
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // TODO(port): add accelerators 362 // TODO(port): add accelerators
363 #endif 363 #endif
364 Close(); 364 Close();
365 return true; 365 return true;
366 } 366 }
367 367
368 //////////////////////////////////////////////////////////////////////////////// 368 ////////////////////////////////////////////////////////////////////////////////
369 // DialogClientView, ButtonListener implementation: 369 // DialogClientView, ButtonListener implementation:
370 370
371 void DialogClientView::ButtonPressed(Button* sender) { 371 void DialogClientView::ButtonPressed(Button* sender) {
372 // 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.
374 if (!GetDialogDelegate())
375 return;
376
372 if (sender == ok_button_) { 377 if (sender == ok_button_) {
373 AcceptWindow(); 378 AcceptWindow();
374 } else if (sender == cancel_button_) { 379 } else if (sender == cancel_button_) {
375 CancelWindow(); 380 CancelWindow();
376 } else { 381 } else {
377 NOTREACHED(); 382 NOTREACHED();
378 } 383 }
379 } 384 }
380 385
381 //////////////////////////////////////////////////////////////////////////////// 386 ////////////////////////////////////////////////////////////////////////////////
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 initialized = true; 502 initialized = true;
498 } 503 }
499 } 504 }
500 505
501 void DialogClientView::Close() { 506 void DialogClientView::Close() {
502 window()->Close(); 507 window()->Close();
503 GetDialogDelegate()->OnClose(); 508 GetDialogDelegate()->OnClose();
504 } 509 }
505 510
506 } // namespace views 511 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698