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

Side by Side Diff: views/controls/native_control.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/controls/menu/submenu_view.cc ('k') | views/controls/native_control_gtk.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/controls/native_control.h" 5 #include "views/controls/native_control.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlapp.h> 8 #include <atlapp.h>
9 #include <atlcrack.h> 9 #include <atlcrack.h>
10 #include <atlframe.h> 10 #include <atlframe.h>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // for radiobuttons and XP style pushbuttons. 139 // for radiobuttons and XP style pushbuttons.
140 LRESULT OnCtlColor(UINT msg, HDC dc, HWND control) { 140 LRESULT OnCtlColor(UINT msg, HDC dc, HWND control) {
141 const View *ancestor = parent_; 141 const View *ancestor = parent_;
142 while (ancestor) { 142 while (ancestor) {
143 const Background *background = ancestor->background(); 143 const Background *background = ancestor->background();
144 if (background) { 144 if (background) {
145 HBRUSH brush = background->GetNativeControlBrush(); 145 HBRUSH brush = background->GetNativeControlBrush();
146 if (brush) 146 if (brush)
147 return reinterpret_cast<LRESULT>(brush); 147 return reinterpret_cast<LRESULT>(brush);
148 } 148 }
149 ancestor = ancestor->GetParent(); 149 ancestor = ancestor->parent();
150 } 150 }
151 151
152 // COLOR_BTNFACE is the default for dialog box backgrounds. 152 // COLOR_BTNFACE is the default for dialog box backgrounds.
153 return reinterpret_cast<LRESULT>(GetSysColorBrush(COLOR_BTNFACE)); 153 return reinterpret_cast<LRESULT>(GetSysColorBrush(COLOR_BTNFACE));
154 } 154 }
155 155
156 LRESULT OnCtlColorBtn(HDC dc, HWND control) { 156 LRESULT OnCtlColorBtn(HDC dc, HWND control) {
157 return OnCtlColor(WM_CTLCOLORBTN, dc, control); 157 return OnCtlColor(WM_CTLCOLORBTN, dc, control);
158 } 158 }
159 159
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } else if (message == WM_DESTROY) { 384 } else if (message == WM_DESTROY) {
385 ui::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler)); 385 ui::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler));
386 native_control->container_->prop_.reset(); 386 native_control->container_->prop_.reset();
387 } 387 }
388 388
389 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, 389 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window,
390 message, w_param, l_param); 390 message, w_param, l_param);
391 } 391 }
392 392
393 } // namespace views 393 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/submenu_view.cc ('k') | views/controls/native_control_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698