| OLD | NEW |
| 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 "webkit/glue/plugins/pepper_scrollbar.h" | 5 #include "webkit/glue/plugins/pepper_scrollbar.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "ppapi/c/dev/ppp_scrollbar_dev.h" | 9 #include "ppapi/c/dev/ppp_scrollbar_dev.h" |
| 10 #include "skia/ext/platform_canvas.h" | 10 #include "skia/ext/platform_canvas.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 Scrollbar::~Scrollbar() { | 105 Scrollbar::~Scrollbar() { |
| 106 } | 106 } |
| 107 | 107 |
| 108 // static | 108 // static |
| 109 const PPB_Scrollbar_Dev* Scrollbar::GetInterface() { | 109 const PPB_Scrollbar_Dev* Scrollbar::GetInterface() { |
| 110 return &ppb_scrollbar; | 110 return &ppb_scrollbar; |
| 111 } | 111 } |
| 112 | 112 |
| 113 Scrollbar* Scrollbar::AsScrollbar() { |
| 114 return this; |
| 115 } |
| 116 |
| 113 uint32_t Scrollbar::GetValue() { | 117 uint32_t Scrollbar::GetValue() { |
| 114 return scrollbar_->value(); | 118 return scrollbar_->value(); |
| 115 } | 119 } |
| 116 | 120 |
| 117 void Scrollbar::SetValue(uint32_t value) { | 121 void Scrollbar::SetValue(uint32_t value) { |
| 118 scrollbar_->setValue(value); | 122 scrollbar_->setValue(value); |
| 119 } | 123 } |
| 120 | 124 |
| 121 void Scrollbar::SetDocumentSize(uint32_t size) { | 125 void Scrollbar::SetDocumentSize(uint32_t size) { |
| 122 scrollbar_->setDocumentSize(size); | 126 scrollbar_->setDocumentSize(size); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 PP_Rect pp_rect; | 237 PP_Rect pp_rect; |
| 234 pp_rect.point.x = dirty_.x(); | 238 pp_rect.point.x = dirty_.x(); |
| 235 pp_rect.point.y = dirty_.y(); | 239 pp_rect.point.y = dirty_.y(); |
| 236 pp_rect.size.width = dirty_.width(); | 240 pp_rect.size.width = dirty_.width(); |
| 237 pp_rect.size.height = dirty_.height(); | 241 pp_rect.size.height = dirty_.height(); |
| 238 dirty_ = gfx::Rect(); | 242 dirty_ = gfx::Rect(); |
| 239 Invalidate(&pp_rect); | 243 Invalidate(&pp_rect); |
| 240 } | 244 } |
| 241 | 245 |
| 242 } // namespace pepper | 246 } // namespace pepper |
| OLD | NEW |