| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ |
| 6 #define CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> |
| 10 |
| 9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 10 #include "content/renderer/content_renderer_client.h" | 12 #include "content/renderer/content_renderer_client.h" |
| 11 | 13 |
| 12 namespace content { | 14 namespace content { |
| 13 | 15 |
| 14 // Base class for unit tests that need to mock the ContentRendererClient. | 16 // Base class for unit tests that need to mock the ContentRendererClient. |
| 15 class MockContentRendererClient : public ContentRendererClient { | 17 class MockContentRendererClient : public ContentRendererClient { |
| 16 public: | 18 public: |
| 17 virtual ~MockContentRendererClient(); | 19 virtual ~MockContentRendererClient(); |
| 18 virtual void RenderThreadStarted() OVERRIDE; | 20 virtual void RenderThreadStarted() OVERRIDE; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 46 virtual void DidCreateIsolatedScriptContext( | 48 virtual void DidCreateIsolatedScriptContext( |
| 47 WebKit::WebFrame* frame, int world_id, | 49 WebKit::WebFrame* frame, int world_id, |
| 48 v8::Handle<v8::Context> context) OVERRIDE; | 50 v8::Handle<v8::Context> context) OVERRIDE; |
| 49 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 51 virtual unsigned long long VisitedLinkHash(const char* canonical_url, |
| 50 size_t length) OVERRIDE; | 52 size_t length) OVERRIDE; |
| 51 virtual bool IsLinkVisited(unsigned long long link_hash) OVERRIDE; | 53 virtual bool IsLinkVisited(unsigned long long link_hash) OVERRIDE; |
| 52 virtual void PrefetchHostName(const char* hostname, size_t length) OVERRIDE; | 54 virtual void PrefetchHostName(const char* hostname, size_t length) OVERRIDE; |
| 53 virtual bool ShouldOverridePageVisibilityState( | 55 virtual bool ShouldOverridePageVisibilityState( |
| 54 const RenderView* render_view, | 56 const RenderView* render_view, |
| 55 WebKit::WebPageVisibilityState* override_state) const OVERRIDE; | 57 WebKit::WebPageVisibilityState* override_state) const OVERRIDE; |
| 58 virtual bool HandleGetCookieRequest(RenderView* render_view, |
| 59 const GURL& url, |
| 60 const GURL& first_party_for_cookies, |
| 61 std::string* cookies) OVERRIDE; |
| 62 virtual bool HandleSetCookieRequest(RenderView* render_view, |
| 63 const GURL& url, |
| 64 const GURL& first_party_for_cookies, |
| 65 const std::string& value) OVERRIDE; |
| 56 }; | 66 }; |
| 57 | 67 |
| 58 } // namespace content | 68 } // namespace content |
| 59 | 69 |
| 60 #endif // CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ | 70 #endif // CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |