519d2cde9eca32b10d60b7041dbd4a8d5a667f88
[platform/framework/web/crosswalk-tizen.git] /
1 // Copyright 2014 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UTC_BLINK_EWK_HIT_TEST_REQUEST_BASE_H
6 #define UTC_BLINK_EWK_HIT_TEST_REQUEST_BASE_H
7
8 #include "utc_blink_ewk_base.h"
9
10 class utc_blink_ewk_hit_test_request_base : public utc_blink_ewk_base {
11 protected:
12   void LoadFinished(Evas_Object* webview)
13   {
14     EventLoopStop(utc_blink_ewk_base::Success);
15   }
16
17   virtual void CheckHitTest(Ewk_Hit_Test* hit_test) {}
18
19   static void hit_test_result(Evas_Object* o, int x, int y, int mode, Ewk_Hit_Test* hit_test, void* user_data)
20   {
21     utc_blink_ewk_hit_test_request_base* owner = static_cast<utc_blink_ewk_hit_test_request_base*>(user_data);
22     ASSERT_TRUE(owner);
23
24     owner->EventLoopStop(Success);
25     owner->CheckHitTest(hit_test);
26   }
27
28 };
29
30 #endif // UTC_BLINK_EWK_HIT_TEST_REQUEST_BASE_H