diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-26 20:46:06 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-26 20:46:06 +0000 |
commit | f98bb1397345bc5eaa6722ed374cdf8fdac1dbc5 (patch) | |
tree | 659b81c50ac8bee3f2da7f526c4a9d44a41e4fa7 /webkit | |
parent | a791e5d8cbcff116ba930ac210e335b0fb5e0be1 (diff) | |
download | chromium_src-f98bb1397345bc5eaa6722ed374cdf8fdac1dbc5.zip chromium_src-f98bb1397345bc5eaa6722ed374cdf8fdac1dbc5.tar.gz chromium_src-f98bb1397345bc5eaa6722ed374cdf8fdac1dbc5.tar.bz2 |
Change uses of WebScrollbar to WebPluginScrollbar
PPB_Scrollbar_Impl is the only consumer of this class. Currently
WebPluginScrollbar and WebPluginScrollbarClient are just typedef'd to the
non-Plugin version in WebKit. This is in preparation for refactoring some
of its functionality into two different classes.
BUG=none
TEST=compiler
Review URL: https://chromiumcodereview.appspot.com/10668049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/ppapi/ppb_scrollbar_impl.cc | 24 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_scrollbar_impl.h | 16 |
2 files changed, 20 insertions, 20 deletions
diff --git a/webkit/plugins/ppapi/ppb_scrollbar_impl.cc b/webkit/plugins/ppapi/ppb_scrollbar_impl.cc index 3e3f2e9..d6aa704 100644 --- a/webkit/plugins/ppapi/ppb_scrollbar_impl.cc +++ b/webkit/plugins/ppapi/ppb_scrollbar_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,7 +12,7 @@ #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebScrollbar.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginScrollbar.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" #include "webkit/plugins/ppapi/common.h" #include "webkit/plugins/ppapi/event_conversion.h" @@ -30,6 +30,7 @@ using ppapi::thunk::PPB_Scrollbar_API; using WebKit::WebInputEvent; using WebKit::WebRect; using WebKit::WebScrollbar; +using WebKit::WebPluginScrollbar; namespace webkit { namespace ppapi { @@ -55,10 +56,10 @@ void PPB_Scrollbar_Impl::Init(bool vertical) { PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); if (!plugin_instance) return; - scrollbar_.reset(WebScrollbar::createForPlugin( + scrollbar_.reset(WebPluginScrollbar::createForPlugin( vertical ? WebScrollbar::Vertical : WebScrollbar::Horizontal, ResourceHelper::GetPluginInstance(this)->container(), - static_cast<WebKit::WebScrollbarClient*>(this))); + static_cast<WebKit::WebPluginScrollbarClient*>(this))); } PPB_Scrollbar_API* PPB_Scrollbar_Impl::AsPPB_Scrollbar_API() { @@ -71,7 +72,7 @@ void PPB_Scrollbar_Impl::InstanceWasDeleted() { } uint32_t PPB_Scrollbar_Impl::GetThickness() { - return WebScrollbar::defaultThickness(); + return WebPluginScrollbar::defaultThickness(); } bool PPB_Scrollbar_Impl::IsOverlay() { @@ -165,7 +166,7 @@ void PPB_Scrollbar_Impl::SetLocationInternal(const PP_Rect* location) { location->size.height)); } -void PPB_Scrollbar_Impl::valueChanged(WebKit::WebScrollbar* scrollbar) { +void PPB_Scrollbar_Impl::valueChanged(WebKit::WebPluginScrollbar* scrollbar) { PluginModule* plugin_module = ResourceHelper::GetPluginModule(this); if (!plugin_module) return; @@ -186,7 +187,7 @@ void PPB_Scrollbar_Impl::valueChanged(WebKit::WebScrollbar* scrollbar) { scrollbar_->value()); } -void PPB_Scrollbar_Impl::overlayChanged(WebScrollbar* scrollbar) { +void PPB_Scrollbar_Impl::overlayChanged(WebPluginScrollbar* scrollbar) { PluginModule* plugin_module = ResourceHelper::GetPluginModule(this); if (!plugin_module) return; @@ -201,7 +202,7 @@ void PPB_Scrollbar_Impl::overlayChanged(WebScrollbar* scrollbar) { } void PPB_Scrollbar_Impl::invalidateScrollbarRect( - WebKit::WebScrollbar* scrollbar, + WebKit::WebPluginScrollbar* scrollbar, const WebKit::WebRect& rect) { gfx::Rect gfx_rect(rect.x, rect.y, @@ -212,8 +213,8 @@ void PPB_Scrollbar_Impl::invalidateScrollbarRect( // since the PPB_Scrollbar_Impl code is still in the middle of updating its // internal state. // Note: we use a WeakPtrFactory here so that a lingering callback can not - // modify the lifetime of this object. Otherwise, WebKit::WebScrollbar could - // outlive WebKit::WebPluginContainer, which is against its contract. + // modify the lifetime of this object. Otherwise, WebKit::WebPluginScrollbar + // could outlive WebKit::WebPluginContainer, which is against its contract. MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&PPB_Scrollbar_Impl::NotifyInvalidate, @@ -221,7 +222,7 @@ void PPB_Scrollbar_Impl::invalidateScrollbarRect( } void PPB_Scrollbar_Impl::getTickmarks( - WebKit::WebScrollbar* scrollbar, + WebKit::WebPluginScrollbar* scrollbar, WebKit::WebVector<WebKit::WebRect>* tick_marks) const { if (tickmarks_.empty()) { WebRect* rects = NULL; @@ -245,4 +246,3 @@ void PPB_Scrollbar_Impl::NotifyInvalidate() { } // namespace ppapi } // namespace webkit - diff --git a/webkit/plugins/ppapi/ppb_scrollbar_impl.h b/webkit/plugins/ppapi/ppb_scrollbar_impl.h index 7ba27b9..f6f925d 100644 --- a/webkit/plugins/ppapi/ppb_scrollbar_impl.h +++ b/webkit/plugins/ppapi/ppb_scrollbar_impl.h @@ -12,7 +12,7 @@ #include "base/memory/weak_ptr.h" #include "ppapi/thunk/ppb_scrollbar_api.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebScrollbarClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginScrollbarClient.h" #include "ui/gfx/rect.h" #include "webkit/plugins/ppapi/ppb_widget_impl.h" @@ -21,7 +21,7 @@ namespace ppapi { class PPB_Scrollbar_Impl : public PPB_Widget_Impl, public ::ppapi::thunk::PPB_Scrollbar_API, - public WebKit::WebScrollbarClient { + public WebKit::WebPluginScrollbarClient { public: static PP_Resource Create(PP_Instance instance, bool vertical); @@ -51,20 +51,20 @@ class PPB_Scrollbar_Impl : public PPB_Widget_Impl, const ::ppapi::InputEventData& data) OVERRIDE; virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; - // WebKit::WebScrollbarClient implementation. - virtual void valueChanged(WebKit::WebScrollbar* scrollbar) OVERRIDE; - virtual void overlayChanged(WebKit::WebScrollbar* scrollbar) OVERRIDE; - virtual void invalidateScrollbarRect(WebKit::WebScrollbar* scrollbar, + // WebKit::WebPluginScrollbarClient implementation. + virtual void valueChanged(WebKit::WebPluginScrollbar* scrollbar) OVERRIDE; + virtual void overlayChanged(WebKit::WebPluginScrollbar* scrollbar) OVERRIDE; + virtual void invalidateScrollbarRect(WebKit::WebPluginScrollbar* scrollbar, const WebKit::WebRect& rect) OVERRIDE; virtual void getTickmarks( - WebKit::WebScrollbar* scrollbar, + WebKit::WebPluginScrollbar* scrollbar, WebKit::WebVector<WebKit::WebRect>* tick_marks) const OVERRIDE; void NotifyInvalidate(); gfx::Rect dirty_; std::vector<WebKit::WebRect> tickmarks_; - scoped_ptr<WebKit::WebScrollbar> scrollbar_; + scoped_ptr<WebKit::WebPluginScrollbar> scrollbar_; // Used so that the post task for Invalidate doesn't keep an extra reference. base::WeakPtrFactory<PPB_Scrollbar_Impl> weak_ptr_factory_; |