| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "ipc/ipc_message.h" | 13 #include "ipc/ipc_message.h" |
| 14 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 class SkBitmap; | 18 class SkBitmap; |
| 19 | 19 |
| 20 namespace content { |
| 21 class Referrer; |
| 22 } |
| 23 |
| 20 namespace WebKit { | 24 namespace WebKit { |
| 21 class WebAudioSourceProvider; | 25 class WebAudioSourceProvider; |
| 22 class WebFrame; | 26 class WebFrame; |
| 23 class WebMediaPlayerClient; | 27 class WebMediaPlayerClient; |
| 24 class WebPlugin; | 28 class WebPlugin; |
| 25 class WebURLRequest; | 29 class WebURLRequest; |
| 26 struct WebPluginParams; | 30 struct WebPluginParams; |
| 27 struct WebURLError; | 31 struct WebURLError; |
| 28 } | 32 } |
| 29 | 33 |
| 30 namespace webkit { | 34 namespace webkit { |
| 31 namespace ppapi { | 35 namespace ppapi { |
| 32 class PpapiInterfaceFactoryManager; | 36 class PpapiInterfaceFactoryManager; |
| 33 } | 37 } |
| 34 } | 38 } |
| 35 | 39 |
| 36 namespace media { | 40 namespace media { |
| 37 class FilterCollection; | 41 class FilterCollection; |
| 38 class MediaLog; | 42 class MediaLog; |
| 39 class MessageLoopFactory; | 43 class MessageLoopFactory; |
| 40 } | 44 } |
| 41 | 45 |
| 46 namespace gfx { |
| 47 class Size; |
| 48 } |
| 49 |
| 42 namespace webkit_media { | 50 namespace webkit_media { |
| 43 class MediaStreamClient; | 51 class MediaStreamClient; |
| 44 class WebMediaPlayerDelegate; | 52 class WebMediaPlayerDelegate; |
| 45 class WebMediaPlayerImpl; | 53 class WebMediaPlayerImpl; |
| 46 } | 54 } |
| 47 | 55 |
| 48 namespace v8 { | 56 namespace v8 { |
| 49 class Context; | 57 class Context; |
| 50 template<class T> class Handle; | 58 template<class T> class Handle; |
| 51 } | 59 } |
| 52 | 60 |
| 53 namespace content { | 61 namespace content { |
| 54 | 62 |
| 63 class Referrer; |
| 55 class RenderView; | 64 class RenderView; |
| 56 | 65 |
| 57 // Embedder API for participating in renderer logic. | 66 // Embedder API for participating in renderer logic. |
| 58 class ContentRendererClient { | 67 class ContentRendererClient { |
| 59 public: | 68 public: |
| 60 virtual ~ContentRendererClient() {} | 69 virtual ~ContentRendererClient() {} |
| 61 | 70 |
| 62 // Notifies us that the RenderThread has been created. | 71 // Notifies us that the RenderThread has been created. |
| 63 virtual void RenderThreadStarted() = 0; | 72 virtual void RenderThreadStarted() = 0; |
| 64 | 73 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 int world_id) = 0; | 156 int world_id) = 0; |
| 148 virtual void WillReleaseScriptContext(WebKit::WebFrame* frame, | 157 virtual void WillReleaseScriptContext(WebKit::WebFrame* frame, |
| 149 v8::Handle<v8::Context>, | 158 v8::Handle<v8::Context>, |
| 150 int world_id) = 0; | 159 int world_id) = 0; |
| 151 | 160 |
| 152 // See WebKit::WebKitPlatformSupport. | 161 // See WebKit::WebKitPlatformSupport. |
| 153 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 162 virtual unsigned long long VisitedLinkHash(const char* canonical_url, |
| 154 size_t length) = 0; | 163 size_t length) = 0; |
| 155 virtual bool IsLinkVisited(unsigned long long link_hash) = 0; | 164 virtual bool IsLinkVisited(unsigned long long link_hash) = 0; |
| 156 virtual void PrefetchHostName(const char* hostname, size_t length) = 0; | 165 virtual void PrefetchHostName(const char* hostname, size_t length) = 0; |
| 166 virtual void NewLinkPrerender(int prerender_id, |
| 167 int render_view_route_id, |
| 168 const GURL& url, |
| 169 const content::Referrer& referrer, |
| 170 const gfx::Size& size) = 0; |
| 171 virtual void RemovedLinkPrerender(int prerender_id) = 0; |
| 172 virtual void UnloadedLinkPrerender(int prerender_id) = 0; |
| 157 virtual bool ShouldOverridePageVisibilityState( | 173 virtual bool ShouldOverridePageVisibilityState( |
| 158 const RenderView* render_view, | 174 const RenderView* render_view, |
| 159 WebKit::WebPageVisibilityState* override_state) const = 0; | 175 WebKit::WebPageVisibilityState* override_state) const = 0; |
| 160 | 176 |
| 161 // Return true if the GetCookie request will be handled by the embedder. | 177 // Return true if the GetCookie request will be handled by the embedder. |
| 162 // Cookies are returned in the cookie parameter. | 178 // Cookies are returned in the cookie parameter. |
| 163 virtual bool HandleGetCookieRequest(RenderView* sender, | 179 virtual bool HandleGetCookieRequest(RenderView* sender, |
| 164 const GURL& url, | 180 const GURL& url, |
| 165 const GURL& first_party_for_cookies, | 181 const GURL& first_party_for_cookies, |
| 166 std::string* cookies) = 0; | 182 std::string* cookies) = 0; |
| 167 | 183 |
| 168 // Return true if the SetCookie request will be handled by the embedder. | 184 // Return true if the SetCookie request will be handled by the embedder. |
| 169 // Cookies to be set are passed in the value parameter. | 185 // Cookies to be set are passed in the value parameter. |
| 170 virtual bool HandleSetCookieRequest(RenderView* sender, | 186 virtual bool HandleSetCookieRequest(RenderView* sender, |
| 171 const GURL& url, | 187 const GURL& url, |
| 172 const GURL& first_party_for_cookies, | 188 const GURL& first_party_for_cookies, |
| 173 const std::string& value) = 0; | 189 const std::string& value) = 0; |
| 174 | 190 |
| 175 virtual void RegisterPPAPIInterfaceFactories( | 191 virtual void RegisterPPAPIInterfaceFactories( |
| 176 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; | 192 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; |
| 177 }; | 193 }; |
| 178 | 194 |
| 179 } // namespace content | 195 } // namespace content |
| 180 | 196 |
| 181 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 197 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |