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 CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/renderer/content_renderer_client.h" | 10 #include "content/renderer/content_renderer_client.h" |
11 | 11 |
| 12 class ChromeRenderProcessObserver; |
12 class ExtensionDispatcher; | 13 class ExtensionDispatcher; |
13 class RendererHistogramSnapshots; | 14 class RendererHistogramSnapshots; |
14 class RendererNetPredictor; | 15 class RendererNetPredictor; |
15 class SpellCheck; | 16 class SpellCheck; |
16 class VisitedLinkSlave; | 17 class VisitedLinkSlave; |
17 | 18 |
18 namespace safe_browsing { | 19 namespace safe_browsing { |
19 class PhishingClassifierFilter; | 20 class PhishingClassifierFilter; |
20 } | 21 } |
21 | 22 |
(...skipping 24 matching lines...) Expand all Loading... |
46 const WebKit::WebURLError& error); | 47 const WebKit::WebURLError& error); |
47 virtual bool RunIdleHandlerWhenWidgetsHidden(); | 48 virtual bool RunIdleHandlerWhenWidgetsHidden(); |
48 virtual bool AllowPopup(const GURL& creator); | 49 virtual bool AllowPopup(const GURL& creator); |
49 virtual bool ShouldFork(WebKit::WebFrame* frame, | 50 virtual bool ShouldFork(WebKit::WebFrame* frame, |
50 const GURL& url, | 51 const GURL& url, |
51 bool is_content_initiated, | 52 bool is_content_initiated, |
52 bool* send_referrer); | 53 bool* send_referrer); |
53 virtual bool WillSendRequest(WebKit::WebFrame* frame, | 54 virtual bool WillSendRequest(WebKit::WebFrame* frame, |
54 const GURL& url, | 55 const GURL& url, |
55 GURL* new_url); | 56 GURL* new_url); |
| 57 virtual FilePath GetMediaLibraryPath(); |
| 58 virtual bool ShouldPumpEventsDuringCookieMessage(); |
56 virtual void DidCreateScriptContext(WebKit::WebFrame* frame); | 59 virtual void DidCreateScriptContext(WebKit::WebFrame* frame); |
57 virtual void DidDestroyScriptContext(WebKit::WebFrame* frame); | 60 virtual void DidDestroyScriptContext(WebKit::WebFrame* frame); |
58 virtual void DidCreateIsolatedScriptContext(WebKit::WebFrame* frame); | 61 virtual void DidCreateIsolatedScriptContext(WebKit::WebFrame* frame); |
59 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 62 virtual unsigned long long VisitedLinkHash(const char* canonical_url, |
60 size_t length); | 63 size_t length); |
61 virtual bool IsLinkVisited(unsigned long long link_hash); | 64 virtual bool IsLinkVisited(unsigned long long link_hash); |
62 virtual void PrefetchHostName(const char* hostname, size_t length); | 65 virtual void PrefetchHostName(const char* hostname, size_t length); |
63 | 66 |
64 // For testing. | 67 // For testing. |
65 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); | 68 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); |
(...skipping 11 matching lines...) Expand all Loading... |
77 | 80 |
78 // Returns true if the frame is navigating to an URL either into or out of an | 81 // Returns true if the frame is navigating to an URL either into or out of an |
79 // extension app's extent. | 82 // extension app's extent. |
80 // TODO(creis): Temporary workaround for crbug.com/65953: Only return true if | 83 // TODO(creis): Temporary workaround for crbug.com/65953: Only return true if |
81 // we would enter an extension app's extent from a non-app, or if we leave an | 84 // we would enter an extension app's extent from a non-app, or if we leave an |
82 // extension with no web extent. We avoid swapping processes to exit a hosted | 85 // extension with no web extent. We avoid swapping processes to exit a hosted |
83 // app with a web extent for now, since we do not yet restore context (such | 86 // app with a web extent for now, since we do not yet restore context (such |
84 // as window.opener) if the window navigates back. | 87 // as window.opener) if the window navigates back. |
85 bool CrossesExtensionExtents(WebKit::WebFrame* frame, const GURL& new_url); | 88 bool CrossesExtensionExtents(WebKit::WebFrame* frame, const GURL& new_url); |
86 | 89 |
| 90 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; |
87 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; | 91 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; |
88 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; | 92 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; |
89 scoped_ptr<RendererNetPredictor> net_predictor_; | 93 scoped_ptr<RendererNetPredictor> net_predictor_; |
90 scoped_ptr<SpellCheck> spellcheck_; | 94 scoped_ptr<SpellCheck> spellcheck_; |
91 scoped_ptr<VisitedLinkSlave> visited_link_slave_; | 95 scoped_ptr<VisitedLinkSlave> visited_link_slave_; |
92 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 96 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
93 }; | 97 }; |
94 | 98 |
95 } // namespace chrome | 99 } // namespace chrome |
96 | 100 |
97 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 101 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |