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

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

Issue 6462022: It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ... (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
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/slider/slider.h" 5 #include "views/controls/slider/slider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "views/controls/slider/native_slider_wrapper.h" 9 #include "views/controls/slider/native_slider_wrapper.h"
10 #include "views/controls/native/native_view_host.h" 10 #include "views/controls/native/native_view_host.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 value_ = value; 50 value_ = value;
51 if (native_wrapper_) 51 if (native_wrapper_)
52 native_wrapper_->SetValue(value); 52 native_wrapper_->SetValue(value);
53 } 53 }
54 54
55 //////////////////////////////////////////////////////////////////////////////// 55 ////////////////////////////////////////////////////////////////////////////////
56 // Slider, View overrides: 56 // Slider, View overrides:
57 57
58 void Slider::Layout() { 58 void Slider::Layout() {
59 if (native_wrapper_) { 59 if (native_wrapper_) {
60 native_wrapper_->GetView()->SetBoundsRect(GetContentsBounds()); 60 native_wrapper_->GetView()->SetBoundsRect(GetLocalBounds());
61 native_wrapper_->GetView()->Layout(); 61 native_wrapper_->GetView()->Layout();
62 } 62 }
63 } 63 }
64 64
65 gfx::Size Slider::GetPreferredSize() { 65 gfx::Size Slider::GetPreferredSize() {
66 if (native_wrapper_) 66 if (native_wrapper_)
67 return native_wrapper_->GetPreferredSize(); 67 return native_wrapper_->GetPreferredSize();
68 return gfx::Size(); 68 return gfx::Size();
69 } 69 }
70 70
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 NativeSliderWrapper* Slider::CreateWrapper() { 107 NativeSliderWrapper* Slider::CreateWrapper() {
108 NativeSliderWrapper* native_wrapper = 108 NativeSliderWrapper* native_wrapper =
109 NativeSliderWrapper::CreateWrapper(this); 109 NativeSliderWrapper::CreateWrapper(this);
110 110
111 native_wrapper->UpdateEnabled(); 111 native_wrapper->UpdateEnabled();
112 112
113 return native_wrapper; 113 return native_wrapper;
114 } 114 }
115 115
116 } // namespace views 116 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698