| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/test/fake_web_scrollbar.h" | 5 #include "cc/test/fake_web_scrollbar.h" |
| 6 | 6 |
| 7 namespace cc { | 7 namespace cc { |
| 8 | 8 |
| 9 bool FakeWebScrollbar::isOverlay() const { | 9 bool FakeWebScrollbar::isOverlay() const { |
| 10 return is_overlay_; | 10 return is_overlay_; |
| 11 } | 11 } |
| 12 | 12 |
| 13 int FakeWebScrollbar::value() const { | 13 int FakeWebScrollbar::value() const { |
| 14 return 0; | 14 return 0; |
| 15 } | 15 } |
| 16 | 16 |
| 17 WebKit::WebPoint FakeWebScrollbar::location() const { | 17 WebKit::WebPoint FakeWebScrollbar::location() const { |
| 18 return WebKit::WebPoint(); | 18 return location_; |
| 19 } | 19 } |
| 20 | 20 |
| 21 WebKit::WebSize FakeWebScrollbar::size() const { | 21 WebKit::WebSize FakeWebScrollbar::size() const { |
| 22 return WebKit::WebSize(); | 22 return WebKit::WebSize(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 bool FakeWebScrollbar::enabled() const { | 25 bool FakeWebScrollbar::enabled() const { |
| 26 return true; | 26 return true; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool FakeWebScrollbar::isCustomScrollbar() const { | 63 bool FakeWebScrollbar::isCustomScrollbar() const { |
| 64 return false; | 64 return false; |
| 65 } | 65 } |
| 66 | 66 |
| 67 WebKit::WebScrollbar::Orientation FakeWebScrollbar::orientation() const { | 67 WebKit::WebScrollbar::Orientation FakeWebScrollbar::orientation() const { |
| 68 return WebScrollbar::Horizontal; | 68 return WebScrollbar::Horizontal; |
| 69 } | 69 } |
| 70 | 70 |
| 71 FakeWebScrollbar::FakeWebScrollbar() : is_overlay_(false) {} | 71 void FakeWebScrollbar::SetLocation(const WebKit::WebPoint& location) { |
| 72 location_ = location; |
| 73 } |
| 74 |
| 75 FakeWebScrollbar::FakeWebScrollbar() |
| 76 : is_overlay_(false), location_(WebKit::WebPoint()) {} |
| 72 | 77 |
| 73 } // namespace cc | 78 } // namespace cc |
| OLD | NEW |