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

Side by Side Diff: content/shell/shell_content_renderer_client.h

Issue 10449063: Create default implementations of ContentRendererClient, ContentUtilityClient, and ContentPluginCli… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_
6 #define CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ 6 #define CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/renderer/content_renderer_client.h" 11 #include "content/public/renderer/content_renderer_client.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class ShellRenderProcessObserver; 15 class ShellRenderProcessObserver;
16 16
17 class ShellContentRendererClient : public ContentRendererClient { 17 class ShellContentRendererClient : public ContentRendererClient {
18 public: 18 public:
19 ShellContentRendererClient(); 19 ShellContentRendererClient();
20 virtual ~ShellContentRendererClient(); 20 virtual ~ShellContentRendererClient();
21 virtual void RenderThreadStarted() OVERRIDE; 21 virtual void RenderThreadStarted() OVERRIDE;
22 virtual void RenderViewCreated(RenderView* render_view) OVERRIDE; 22 virtual void RenderViewCreated(RenderView* render_view) OVERRIDE;
23 virtual void SetNumberOfViews(int number_of_views) OVERRIDE;
24 virtual SkBitmap* GetSadPluginBitmap() OVERRIDE;
25 virtual std::string GetDefaultEncoding() OVERRIDE;
26 virtual bool OverrideCreatePlugin(
27 RenderView* render_view,
28 WebKit::WebFrame* frame,
29 const WebKit::WebPluginParams& params,
30 WebKit::WebPlugin** plugin) OVERRIDE;
31 virtual WebKit::WebPlugin* CreatePluginReplacement(
32 RenderView* render_view,
33 const FilePath& plugin_path) OVERRIDE;
34 virtual bool HasErrorPage(int http_status_code,
35 std::string* error_domain) OVERRIDE;
36 virtual void GetNavigationErrorStrings(
37 const WebKit::WebURLRequest& failed_request,
38 const WebKit::WebURLError& error,
39 std::string* error_html,
40 string16* error_description) OVERRIDE;
41 virtual webkit_media::WebMediaPlayerImpl* OverrideCreateWebMediaPlayer(
42 RenderView* render_view,
43 WebKit::WebFrame* frame,
44 WebKit::WebMediaPlayerClient* client,
45 base::WeakPtr<webkit_media::WebMediaPlayerDelegate> delegate,
46 media::FilterCollection* collection,
47 WebKit::WebAudioSourceProvider* audio_source_provider,
48 media::MessageLoopFactory* message_loop_factory,
49 webkit_media::MediaStreamClient* media_stream_client,
50 media::MediaLog* media_log) OVERRIDE;
51 virtual bool RunIdleHandlerWhenWidgetsHidden() OVERRIDE;
52 virtual bool AllowPopup(const GURL& creator) OVERRIDE;
53 virtual bool ShouldFork(WebKit::WebFrame* frame,
54 const GURL& url,
55 bool is_initial_navigation,
56 bool* send_referrer) OVERRIDE;
57 virtual bool WillSendRequest(WebKit::WebFrame* frame,
58 const GURL& url,
59 GURL* new_url) OVERRIDE;
60 virtual bool ShouldPumpEventsDuringCookieMessage() OVERRIDE;
61 virtual void DidCreateScriptContext(WebKit::WebFrame* frame,
62 v8::Handle<v8::Context> context,
63 int extension_group,
64 int world_id) OVERRIDE;
65 virtual void WillReleaseScriptContext(WebKit::WebFrame* frame,
66 v8::Handle<v8::Context> context,
67 int world_id) OVERRIDE;
68 virtual unsigned long long VisitedLinkHash(const char* canonical_url,
69 size_t length) OVERRIDE;
70 virtual bool IsLinkVisited(unsigned long long link_hash) OVERRIDE;
71 virtual void PrefetchHostName(const char* hostname, size_t length) OVERRIDE;
72 virtual bool ShouldOverridePageVisibilityState(
73 const RenderView* render_view,
74 WebKit::WebPageVisibilityState* override_state) const OVERRIDE;
75 virtual bool HandleGetCookieRequest(RenderView* sender,
76 const GURL& url,
77 const GURL& first_party_for_cookies,
78 std::string* cookies) OVERRIDE;
79 virtual bool HandleSetCookieRequest(RenderView* sender,
80 const GURL& url,
81 const GURL& first_party_for_cookies,
82 const std::string& value) OVERRIDE;
83 virtual void RegisterPPAPIInterfaceFactories(
84 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) OVERRIDE;
85 23
86 private: 24 private:
87 scoped_ptr<ShellRenderProcessObserver> shell_observer_; 25 scoped_ptr<ShellRenderProcessObserver> shell_observer_;
88 }; 26 };
89 27
90 } // namespace content 28 } // namespace content
91 29
92 #endif // CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_ 30 #endif // CONTENT_SHELL_SHELL_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698