| OLD | NEW | 
|   1 // Copyright 2016 The Chromium Authors. All rights reserved. |   1 // Copyright 2016 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 #ifndef CONTENT_SHELL_TEST_RUNNER_WEB_WIDGET_TEST_CLIENT_H_ |   5 #ifndef CONTENT_SHELL_TEST_RUNNER_WEB_WIDGET_TEST_CLIENT_H_ | 
|   6 #define CONTENT_SHELL_TEST_RUNNER_WEB_WIDGET_TEST_CLIENT_H_ |   6 #define CONTENT_SHELL_TEST_RUNNER_WEB_WIDGET_TEST_CLIENT_H_ | 
|   7  |   7  | 
|   8 #include "base/macros.h" |   8 #include "base/macros.h" | 
|   9 #include "base/memory/weak_ptr.h" |   9 #include "base/memory/weak_ptr.h" | 
|  10 #include "third_party/WebKit/public/web/WebWidgetClient.h" |  10 #include "third_party/WebKit/public/web/WebWidgetClient.h" | 
|  11  |  11  | 
|  12 namespace test_runner { |  12 namespace test_runner { | 
|  13  |  13  | 
|  14 class TestRunner; |  14 class TestRunner; | 
|  15 class TestRunnerForSpecificView; |  15 class TestRunnerForSpecificView; | 
|  16 class WebTestDelegate; |  16 class WebTestDelegate; | 
|  17 class WebWidgetTestProxyBase; |  17 class WebWidgetTestProxyBase; | 
|  18  |  18  | 
|  19 // WebWidgetTestClient implements WebWidgetClient interface, providing behavior |  19 // WebWidgetTestClient implements WebWidgetClient interface, providing behavior | 
|  20 // expected by tests.  WebWidgetTestClient ends up used by WebViewTestProxy |  20 // expected by tests.  WebWidgetTestClient ends up used by WebViewTestProxy | 
|  21 // which coordinates forwarding WebWidgetClient calls either to |  21 // which coordinates forwarding WebWidgetClient calls either to | 
|  22 // WebWidgetTestClient or to the product code (i.e. currently to |  22 // WebWidgetTestClient or to the product code (i.e. currently to | 
|  23 // RenderViewImpl). |  23 // RenderViewImpl). | 
|  24 class WebWidgetTestClient : public blink::WebWidgetClient { |  24 class WebWidgetTestClient : public blink::WebWidgetClient { | 
|  25  public: |  25  public: | 
|  26   // Caller has to ensure that all arguments (i.e. |test_runner| and |delegate|) |  26   // Caller has to ensure that all arguments (i.e. |test_runner| and |delegate|) | 
|  27   // live longer than |this|. |  27   // live longer than |this|. | 
|  28   WebWidgetTestClient(WebWidgetTestProxyBase* web_widget_test_proxy_base); |  28   WebWidgetTestClient(WebWidgetTestProxyBase* web_widget_test_proxy_base); | 
|  29  |  29  | 
|  30   virtual ~WebWidgetTestClient(); |  30   ~WebWidgetTestClient() override; | 
|  31  |  31  | 
|  32   // WebWidgetClient overrides needed by WebWidgetTestProxy. |  32   // WebWidgetClient overrides needed by WebWidgetTestProxy. | 
|  33   blink::WebScreenInfo screenInfo() override; |  33   blink::WebScreenInfo screenInfo() override; | 
|  34   void scheduleAnimation() override; |  34   void scheduleAnimation() override; | 
|  35   bool requestPointerLock() override; |  35   bool requestPointerLock() override; | 
|  36   void requestPointerUnlock() override; |  36   void requestPointerUnlock() override; | 
|  37   bool isPointerLocked() override; |  37   bool isPointerLocked() override; | 
|  38   void setToolTipText(const blink::WebString& text, |  38   void setToolTipText(const blink::WebString& text, | 
|  39                       blink::WebTextDirection direction) override; |  39                       blink::WebTextDirection direction) override; | 
|  40   void startDragging(blink::WebReferrerPolicy policy, |  40   void startDragging(blink::WebReferrerPolicy policy, | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
|  56   bool animation_scheduled_; |  56   bool animation_scheduled_; | 
|  57  |  57  | 
|  58   base::WeakPtrFactory<WebWidgetTestClient> weak_factory_; |  58   base::WeakPtrFactory<WebWidgetTestClient> weak_factory_; | 
|  59  |  59  | 
|  60   DISALLOW_COPY_AND_ASSIGN(WebWidgetTestClient); |  60   DISALLOW_COPY_AND_ASSIGN(WebWidgetTestClient); | 
|  61 }; |  61 }; | 
|  62  |  62  | 
|  63 }  // namespace test_runner |  63 }  // namespace test_runner | 
|  64  |  64  | 
|  65 #endif  // CONTENT_SHELL_TEST_RUNNER_WEB_WIDGET_TEST_CLIENT_H_ |  65 #endif  // CONTENT_SHELL_TEST_RUNNER_WEB_WIDGET_TEST_CLIENT_H_ | 
| OLD | NEW |