Chromium Code Reviews| Index: third_party/WebKit/Source/platform/scroll/ScrollbarParent.h |
| diff --git a/third_party/WebKit/Source/platform/PlatformChromeClient.h b/third_party/WebKit/Source/platform/scroll/ScrollbarParent.h |
| similarity index 52% |
| copy from third_party/WebKit/Source/platform/PlatformChromeClient.h |
| copy to third_party/WebKit/Source/platform/scroll/ScrollbarParent.h |
| index 3f939b80f2cf2b00f12068992a23d0a5960ec9f9..1d13d9a9f60f22541d072e9251be9f0d5692607d 100644 |
| --- a/third_party/WebKit/Source/platform/PlatformChromeClient.h |
| +++ b/third_party/WebKit/Source/platform/scroll/ScrollbarParent.h |
| @@ -1,5 +1,7 @@ |
| /* |
| - * Copyright (C) 2008 Apple Inc. All rights reserved. |
| + * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| + * Copyright (C) 2008 Collabora Ltd. All rights reserved. |
| + * Copyright (C) 2013 Google Inc. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions |
| @@ -10,10 +12,10 @@ |
| * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. |
| * |
| - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| @@ -23,42 +25,27 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef PlatformChromeClient_h |
| -#define PlatformChromeClient_h |
| +#ifndef ScrollbarParent_h |
| +#define ScrollbarParent_h |
| #include "platform/PlatformExport.h" |
| +#include "platform/geometry/IntPoint.h" |
| #include "platform/heap/Handle.h" |
| -#include "platform/wtf/Allocator.h" |
| -#include "platform/wtf/Noncopyable.h" |
| namespace blink { |
| -class IntRect; |
| -class FrameViewBase; |
| -class LocalFrame; |
| - |
| -class PLATFORM_EXPORT PlatformChromeClient |
| - : public GarbageCollectedFinalized<PlatformChromeClient> { |
| - WTF_MAKE_NONCOPYABLE(PlatformChromeClient); |
| +// ScrollbarParent is set as the parent container of Scrollbars in |
| +// Scrollbar::SetParent. This class is implemented by |
| +// core/frame/FrameView and is required for geometry conversions with the root |
| +// frame and to provide StyleChanged notifications back to scrollbars. |
| +class PLATFORM_EXPORT ScrollbarParent : public GarbageCollectedMixin { |
|
szager1
2017/05/02 14:31:36
Are you planning to make PaintLayerScrollableArea
|
| public: |
| - PlatformChromeClient() {} |
| - virtual ~PlatformChromeClient() {} |
| - DEFINE_INLINE_VIRTUAL_TRACE() {} |
| - |
| - // Requests the host invalidate the contents. |
| - virtual void InvalidateRect(const IntRect& update_rect) = 0; |
| - |
| - // Converts the rect from the viewport coordinates to screen coordinates. |
| - virtual IntRect ViewportToScreen(const IntRect&, |
| - const FrameViewBase*) const = 0; |
| - |
| - // Converts the scalar value from the window coordinates to the viewport |
| - // scale. |
| - virtual float WindowToViewportScalar(const float) const = 0; |
| + ScrollbarParent() {} |
| + virtual ~ScrollbarParent() {} |
| - virtual void ScheduleAnimation(LocalFrame*) = 0; |
| + virtual IntPoint ConvertPointFromRootFrame(const IntPoint&) const = 0; |
| }; |
| } // namespace blink |
| -#endif // PlatformChromeClient_h |
| +#endif // ScrollbarParent_h |