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

Unified Diff: webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp

Issue 11192050: Rename compositor bindings filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp
diff --git a/webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp b/webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp
deleted file mode 100644
index 32f44f83961b1c648f803cbead3a9859896f1602..0000000000000000000000000000000000000000
--- a/webkit/compositor_bindings/WebToCCInputHandlerAdapter.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 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.
-
-#include "config.h"
-
-#include "WebToCCInputHandlerAdapter.h"
-
-#include "cc/stubs/int_point.h"
-#include "cc/stubs/int_size.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClient.h"
-#include "webcore_convert.h"
-
-#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \
- COMPILE_ASSERT(int(WebKit::webkit_name) == int(cc::cc_name), mismatching_enums)
-
-COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusOnMainThread, CCInputHandlerClient::ScrollOnMainThread);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusStarted, CCInputHandlerClient::ScrollStarted);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusIgnored, CCInputHandlerClient::ScrollIgnored);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollInputTypeGesture, CCInputHandlerClient::Gesture);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollInputTypeWheel, CCInputHandlerClient::Wheel);
-
-namespace WebKit {
-
-scoped_ptr<WebToCCInputHandlerAdapter> WebToCCInputHandlerAdapter::create(scoped_ptr<WebInputHandler> handler)
-{
- return scoped_ptr<WebToCCInputHandlerAdapter>(new WebToCCInputHandlerAdapter(handler.Pass()));
-}
-
-WebToCCInputHandlerAdapter::WebToCCInputHandlerAdapter(scoped_ptr<WebInputHandler> handler)
- : m_handler(handler.Pass())
-{
-}
-
-WebToCCInputHandlerAdapter::~WebToCCInputHandlerAdapter()
-{
-}
-
-class WebToCCInputHandlerAdapter::ClientAdapter : public WebInputHandlerClient {
-public:
- ClientAdapter(cc::CCInputHandlerClient* client)
- : m_client(client)
- {
- }
-
- virtual ~ClientAdapter()
- {
- }
-
- virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) OVERRIDE
- {
- return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scrollBegin(convert(point), static_cast<cc::CCInputHandlerClient::ScrollInputType>(type)));
- }
-
- virtual void scrollBy(WebPoint point, WebSize offset) OVERRIDE
- {
- m_client->scrollBy(convert(point), convert(offset));
- }
-
- virtual void scrollEnd() OVERRIDE
- {
- m_client->scrollEnd();
- }
-
- virtual void pinchGestureBegin() OVERRIDE
- {
- m_client->pinchGestureBegin();
- }
-
- virtual void pinchGestureUpdate(float magnifyDelta, WebPoint anchor) OVERRIDE
- {
- m_client->pinchGestureUpdate(magnifyDelta, convert(anchor));
- }
-
- virtual void pinchGestureEnd() OVERRIDE
- {
- m_client->pinchGestureEnd();
- }
-
- virtual void startPageScaleAnimation(WebSize targetPosition,
- bool anchorPoint,
- float pageScale,
- double startTime,
- double duration) OVERRIDE
- {
- m_client->startPageScaleAnimation(convert(targetPosition), anchorPoint, pageScale, startTime, duration);
- }
-
- virtual void scheduleAnimation() OVERRIDE
- {
- m_client->scheduleAnimation();
- }
-
-private:
- cc::CCInputHandlerClient* m_client;
-};
-
-
-void WebToCCInputHandlerAdapter::bindToClient(cc::CCInputHandlerClient* client)
-{
- m_clientAdapter.reset(new ClientAdapter(client));
- m_handler->bindToClient(m_clientAdapter.get());
-}
-
-void WebToCCInputHandlerAdapter::animate(double monotonicTime)
-{
- m_handler->animate(monotonicTime);
-}
-
-}
« no previous file with comments | « webkit/compositor_bindings/WebToCCInputHandlerAdapter.h ('k') | webkit/compositor_bindings/WebTransformAnimationCurveImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698