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

Unified Diff: content/renderer/content_renderer_client.h

Issue 8100013: Start off the Content API by moving content::ContentRendererClient to content\public\renderer.BU... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/mock_content_renderer_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/content_renderer_client.h
===================================================================
--- content/renderer/content_renderer_client.h (revision 103561)
+++ content/renderer/content_renderer_client.h (working copy)
@@ -1,137 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_
-#define CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_
-#pragma once
-
-#include <string>
-
-#include "base/string16.h"
-#include "ipc/ipc_message.h"
-#include "content/common/content_client.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityState.h"
-
-class FilePath;
-class GURL;
-class RenderView;
-class SkBitmap;
-
-namespace WebKit {
-class WebFrame;
-class WebPlugin;
-class WebURLRequest;
-struct WebPluginParams;
-struct WebURLError;
-}
-
-namespace v8 {
-class Context;
-template<class T> class Handle;
-}
-
-namespace content {
-
-// Embedder API for participating in renderer logic.
-class ContentRendererClient {
- public:
- virtual ~ContentRendererClient() {}
-
- // Notifies us that the RenderThread has been created.
- virtual void RenderThreadStarted() = 0;
-
- // Notifies that a new RenderView has been created.
- virtual void RenderViewCreated(RenderView* render_view) = 0;
-
- // Sets a number of views/tabs opened in this process.
- virtual void SetNumberOfViews(int number_of_views) = 0;
-
- // Returns the bitmap to show when a plugin crashed, or NULL for none.
- virtual SkBitmap* GetSadPluginBitmap() = 0;
-
- // Returns the default text encoding.
- virtual std::string GetDefaultEncoding() = 0;
-
- // Allows the embedder to override creating a plugin. If it returns true, then
- // |plugin| will contain the created plugin, although it could be NULL. If it
- // returns false, the content layer will create the plugin.
- virtual bool OverrideCreatePlugin(
- RenderView* render_view,
- WebKit::WebFrame* frame,
- const WebKit::WebPluginParams& params,
- WebKit::WebPlugin** plugin) = 0;
-
- // Give the embedder the ability to set an error page.
- virtual void ShowErrorPage(RenderView* render_view,
- WebKit::WebFrame* frame,
- int http_status_code) = 0;
-
- // Returns the html to display when a navigation error occurs.
- virtual std::string GetNavigationErrorHtml(
- const WebKit::WebURLRequest& failed_request,
- const WebKit::WebURLError& error) = 0;
-
- // Returns true if the renderer process should schedule the idle handler when
- // all widgets are hidden.
- virtual bool RunIdleHandlerWhenWidgetsHidden() = 0;
-
- // Returns true if the given url can create popup windows.
- virtual bool AllowPopup(const GURL& creator) = 0;
-
- // Returns true if we should fork a new process for the given navigation.
- virtual bool ShouldFork(WebKit::WebFrame* frame,
- const GURL& url,
- bool is_content_initiated,
- bool is_initial_navigation,
- bool* send_referrer) = 0;
-
- // Notifies the embedder that the given frame is requesting the resource at
- // |url|. If the function returns true, the url is changed to |new_url|.
- virtual bool WillSendRequest(WebKit::WebFrame* frame,
- const GURL& url,
- GURL* new_url) = 0;
-
- // Whether to pump events when sending sync cookie messages. Needed if the
- // embedder can potentiall put up a modal dialog on the UI thread as a result.
- virtual bool ShouldPumpEventsDuringCookieMessage() = 0;
-
- // See the corresponding functions in WebKit::WebFrameClient.
- virtual void DidCreateScriptContext(WebKit::WebFrame* frame,
- v8::Handle<v8::Context> context,
- int world_id) = 0;
- virtual void WillReleaseScriptContext(WebKit::WebFrame* frame,
- v8::Handle<v8::Context>,
- int world_id) = 0;
-
- // See WebKit::WebKitPlatformSupport.
- virtual unsigned long long VisitedLinkHash(const char* canonical_url,
- size_t length) = 0;
- virtual bool IsLinkVisited(unsigned long long link_hash) = 0;
- virtual void PrefetchHostName(const char* hostname, size_t length) = 0;
- virtual bool ShouldOverridePageVisibilityState(
- const RenderView* render_view,
- WebKit::WebPageVisibilityState* override_state) const = 0;
-
- // Return true if the GetCookie request will be handled by the embedder.
- // Cookies are returned in the cookie parameter.
- virtual bool HandleGetCookieRequest(RenderView* sender,
- const GURL& url,
- const GURL& first_party_for_cookies,
- std::string* cookies) = 0;
-
- // Return true if the SetCookie request will be handled by the embedder.
- // Cookies to be set are passed in the value parameter.
- virtual bool HandleSetCookieRequest(RenderView* sender,
- const GURL& url,
- const GURL& first_party_for_cookies,
- const std::string& value) = 0;
-
- // True if the protocol implemented to serve |url| supports features required
- // by the media engine.
- virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0;
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/mock_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698