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

Side by Side Diff: views/widget/widget_win.cc

Issue 115729: Really theme the find bar. We were previously getting the DefaultThemeProvide... (Closed) Base URL: svn://svn.chromium.org/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 | « views/widget/widget.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) 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/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "base/gfx/native_theme.h" 9 #include "base/gfx/native_theme.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 return win_util::IsWindowActive(GetNativeView()); 389 return win_util::IsWindowActive(GetNativeView());
390 } 390 }
391 391
392 TooltipManager* WidgetWin::GetTooltipManager() { 392 TooltipManager* WidgetWin::GetTooltipManager() {
393 return tooltip_manager_.get(); 393 return tooltip_manager_.get();
394 } 394 }
395 395
396 ThemeProvider* WidgetWin::GetThemeProvider() const { 396 ThemeProvider* WidgetWin::GetThemeProvider() const {
397 Widget* widget = GetRootWidget(); 397 Widget* widget = GetRootWidget();
398 if (widget) { 398 if (widget) {
399 ThemeProvider* provider = widget->GetDialogThemeProvider(); 399 // Attempt to get the theme provider, and fall back to the default theme
400 // provider if not found.
401 ThemeProvider* provider = widget->GetThemeProvider();
402 if (provider)
403 return provider;
404
405 provider = widget->GetDefaultThemeProvider();
400 if (provider) 406 if (provider)
401 return provider; 407 return provider;
402 } 408 }
403 return default_theme_provider_.get(); 409 return default_theme_provider_.get();
404 } 410 }
405 411
406 Window* WidgetWin::GetWindow() { 412 Window* WidgetWin::GetWindow() {
407 return GetWindowImpl(hwnd_); 413 return GetWindowImpl(hwnd_);
408 } 414 }
409 415
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result)) 1038 if (!widget->ProcessWindowMessage(window, message, w_param, l_param, result))
1033 result = DefWindowProc(window, message, w_param, l_param); 1039 result = DefWindowProc(window, message, w_param, l_param);
1034 if (message == WM_NCDESTROY) { 1040 if (message == WM_NCDESTROY) {
1035 widget->hwnd_ = NULL; 1041 widget->hwnd_ = NULL;
1036 widget->OnFinalMessage(window); 1042 widget->OnFinalMessage(window);
1037 } 1043 }
1038 return result; 1044 return result;
1039 } 1045 }
1040 1046
1041 } // namespace views 1047 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698