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

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

Issue 146049: Fix ifdef that was triggering a NOTIMPLEMENTED in browser tests (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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 int buttons = dd->GetDialogButtons(); 251 int buttons = dd->GetDialogButtons();
252 if (buttons & MessageBoxFlags::DIALOGBUTTON_CANCEL) 252 if (buttons & MessageBoxFlags::DIALOGBUTTON_CANCEL)
253 return dd->Cancel(); 253 return dd->Cancel();
254 if (buttons & MessageBoxFlags::DIALOGBUTTON_OK) 254 if (buttons & MessageBoxFlags::DIALOGBUTTON_OK)
255 return dd->Accept(true); 255 return dd->Accept(true);
256 } 256 }
257 return true; 257 return true;
258 } 258 }
259 259
260 void DialogClientView::WindowClosing() { 260 void DialogClientView::WindowClosing() {
261 #if !defined(TOOLKIT_VIEWS) 261 #if defined(OS_WIN)
262 FocusManager* focus_manager = GetFocusManager(); 262 FocusManager* focus_manager = GetFocusManager();
263 DCHECK(focus_manager); 263 DCHECK(focus_manager);
264 if (focus_manager) 264 if (focus_manager)
265 focus_manager->RemoveFocusChangeListener(this); 265 focus_manager->RemoveFocusChangeListener(this);
266 #else 266 #else
267 NOTIMPLEMENTED(); 267 NOTIMPLEMENTED();
268 #endif 268 #endif
269 ClientView::WindowClosing(); 269 ClientView::WindowClosing();
270 } 270 }
271 271
(...skipping 29 matching lines...) Expand all
301 301
302 void DialogClientView::ViewHierarchyChanged(bool is_add, View* parent, 302 void DialogClientView::ViewHierarchyChanged(bool is_add, View* parent,
303 View* child) { 303 View* child) {
304 if (is_add && child == this) { 304 if (is_add && child == this) {
305 // Can only add and update the dialog buttons _after_ they are added to the 305 // Can only add and update the dialog buttons _after_ they are added to the
306 // view hierarchy since they are native controls and require the 306 // view hierarchy since they are native controls and require the
307 // Container's HWND. 307 // Container's HWND.
308 ShowDialogButtons(); 308 ShowDialogButtons();
309 ClientView::ViewHierarchyChanged(is_add, parent, child); 309 ClientView::ViewHierarchyChanged(is_add, parent, child);
310 310
311 #if !defined(TOOLKIT_VIEWS) 311 #if defined(OS_WIN)
312 FocusManager* focus_manager = GetFocusManager(); 312 FocusManager* focus_manager = GetFocusManager();
313 // Listen for focus change events so we can update the default button. 313 // Listen for focus change events so we can update the default button.
314 DCHECK(focus_manager); // bug #1291225: crash reports seem to indicate it 314 DCHECK(focus_manager); // bug #1291225: crash reports seem to indicate it
315 // can be NULL. 315 // can be NULL.
316 if (focus_manager) 316 if (focus_manager)
317 focus_manager->AddFocusChangeListener(this); 317 focus_manager->AddFocusChangeListener(this);
318 #else 318 #else
319 NOTIMPLEMENTED(); 319 NOTIMPLEMENTED();
320 #endif 320 #endif
321 321
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 initialized = true; 510 initialized = true;
511 } 511 }
512 } 512 }
513 513
514 void DialogClientView::Close() { 514 void DialogClientView::Close() {
515 window()->Close(); 515 window()->Close();
516 GetDialogDelegate()->OnClose(); 516 GetDialogDelegate()->OnClose();
517 } 517 }
518 518
519 } // namespace views 519 } // 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