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

Side by Side Diff: ui/gfx/native_theme_win.cc

Issue 10103019: views: Use NOTREACHED() where appropriate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | ui/views/examples/native_theme_button_example.cc » ('j') | 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/gfx/native_theme_win.h" 5 #include "ui/gfx/native_theme_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <uxtheme.h> 8 #include <uxtheme.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 break; 359 break;
360 case kTextField: 360 case kTextField:
361 PaintTextField(hdc, part, state, rect, extra.text_field); 361 PaintTextField(hdc, part, state, rect, extra.text_field);
362 break; 362 break;
363 363
364 case kSliderTrack: 364 case kSliderTrack:
365 case kSliderThumb: 365 case kSliderThumb:
366 default: 366 default:
367 // While transitioning NativeThemeWin to the single Paint() entry point, 367 // While transitioning NativeThemeWin to the single Paint() entry point,
368 // unsupported parts will DCHECK here. 368 // unsupported parts will DCHECK here.
369 DCHECK(false); 369 NOTREACHED();
370 } 370 }
371 } 371 }
372 372
373 SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const { 373 SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
374 switch (color_id) { 374 switch (color_id) {
375 375
376 // Dialogs 376 // Dialogs
377 case kColorId_DialogBackground: 377 case kColorId_DialogBackground:
378 // TODO(benrg): Should this use the new Windows theme functions? The old 378 // TODO(benrg): Should this use the new Windows theme functions? The old
379 // code in DialogClientView::OnPaint used GetSysColor(COLOR_3DFACE). 379 // code in DialogClientView::OnPaint used GetSysColor(COLOR_3DFACE).
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 handle = open_theme_(NULL, L"Spin"); 1754 handle = open_theme_(NULL, L"Spin");
1755 break; 1755 break;
1756 default: 1756 default:
1757 NOTREACHED(); 1757 NOTREACHED();
1758 } 1758 }
1759 theme_handles_[theme_name] = handle; 1759 theme_handles_[theme_name] = handle;
1760 return handle; 1760 return handle;
1761 } 1761 }
1762 1762
1763 } // namespace gfx 1763 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | ui/views/examples/native_theme_button_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698