| OLD | NEW |
| 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/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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 void NativeControl::SetEnabled(bool enabled) { | 311 void NativeControl::SetEnabled(bool enabled) { |
| 312 if (enabled_ != enabled) { | 312 if (enabled_ != enabled) { |
| 313 View::SetEnabled(enabled); | 313 View::SetEnabled(enabled); |
| 314 if (GetNativeControlHWND()) { | 314 if (GetNativeControlHWND()) { |
| 315 EnableWindow(GetNativeControlHWND(), enabled_); | 315 EnableWindow(GetNativeControlHWND(), enabled_); |
| 316 } | 316 } |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 | 319 |
| 320 void NativeControl::Paint(ChromeCanvas* canvas) { | 320 void NativeControl::Paint(gfx::Canvas* canvas) { |
| 321 } | 321 } |
| 322 | 322 |
| 323 void NativeControl::VisibilityChanged(View* starting_from, bool is_visible) { | 323 void NativeControl::VisibilityChanged(View* starting_from, bool is_visible) { |
| 324 SetVisible(is_visible); | 324 SetVisible(is_visible); |
| 325 } | 325 } |
| 326 | 326 |
| 327 void NativeControl::SetFixedWidth(int width, Alignment alignment) { | 327 void NativeControl::SetFixedWidth(int width, Alignment alignment) { |
| 328 DCHECK(width > 0); | 328 DCHECK(width > 0); |
| 329 fixed_width_ = width; | 329 fixed_width_ = width; |
| 330 horizontal_alignment_ = alignment; | 330 horizontal_alignment_ = alignment; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 RemoveProp(window, kHandlerKey); | 377 RemoveProp(window, kHandlerKey); |
| 378 RemoveProp(window, kNativeControlKey); | 378 RemoveProp(window, kNativeControlKey); |
| 379 TRACK_HWND_DESTRUCTION(window); | 379 TRACK_HWND_DESTRUCTION(window); |
| 380 } | 380 } |
| 381 | 381 |
| 382 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, | 382 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, |
| 383 message, w_param, l_param); | 383 message, w_param, l_param); |
| 384 } | 384 } |
| 385 | 385 |
| 386 } // namespace views | 386 } // namespace views |
| OLD | NEW |