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_RENDER_PROCESS_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ |
6 #define CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ | 6 #define CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 static bool is_incognito_process() { return is_incognito_process_; } | 38 static bool is_incognito_process() { return is_incognito_process_; } |
39 | 39 |
40 // Needs to be called by RenderViews in case of navigations to execute | 40 // Needs to be called by RenderViews in case of navigations to execute |
41 // any 'clear cache' commands that were delayed until the next navigation. | 41 // any 'clear cache' commands that were delayed until the next navigation. |
42 void ExecutePendingClearCache(); | 42 void ExecutePendingClearCache(); |
43 | 43 |
44 // Returns a pointer to the default content settings owned by | 44 // Returns a pointer to the default content settings owned by |
45 // |ChromeRenderProcessObserver|. | 45 // |ChromeRenderProcessObserver|. |
46 const ContentSettings* default_content_settings() const; | 46 const ContentSettings* default_content_settings() const; |
47 | 47 |
48 // Returns a pointer to the image setting rules owned by | 48 // Returns a pointer to the content setting rules owned by |
49 // |ChromeRenderProcessObserver|. | 49 // |ChromeRenderProcessObserver|. |
50 const ContentSettingsForOneType* image_setting_rules() const; | 50 const RendererContentSettingRules* content_setting_rules() const; |
51 | 51 |
52 private: | 52 private: |
53 // RenderProcessObserver implementation. | 53 // RenderProcessObserver implementation. |
54 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 54 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
55 virtual void WebKitInitialized() OVERRIDE; | 55 virtual void WebKitInitialized() OVERRIDE; |
56 | 56 |
57 void OnSetIsIncognitoProcess(bool is_incognito_process); | 57 void OnSetIsIncognitoProcess(bool is_incognito_process); |
58 void OnSetContentSettingsForCurrentURL( | 58 void OnSetContentSettingsForCurrentURL( |
59 const GURL& url, const ContentSettings& content_settings); | 59 const GURL& url, const ContentSettings& content_settings); |
60 void OnSetDefaultContentSettings(const ContentSettings& content_settings); | 60 void OnSetDefaultContentSettings(const ContentSettings& content_settings); |
61 void OnSetImageSettingRules(const ContentSettingsForOneType& settings); | 61 void OnSetContentSettingRules(const RendererContentSettingRules& rules); |
62 void OnSetCacheCapacities(size_t min_dead_capacity, | 62 void OnSetCacheCapacities(size_t min_dead_capacity, |
63 size_t max_dead_capacity, | 63 size_t max_dead_capacity, |
64 size_t capacity); | 64 size_t capacity); |
65 // If |on_navigation| is true, the clearing is delayed until the next | 65 // If |on_navigation| is true, the clearing is delayed until the next |
66 // navigation event. | 66 // navigation event. |
67 void OnClearCache(bool on_navigation); | 67 void OnClearCache(bool on_navigation); |
68 void OnGetCacheResourceStats(); | 68 void OnGetCacheResourceStats(); |
69 void OnSetFieldTrialGroup(const std::string& fiel_trial_name, | 69 void OnSetFieldTrialGroup(const std::string& fiel_trial_name, |
70 const std::string& group_name); | 70 const std::string& group_name); |
71 void OnGetRendererTcmalloc(); | 71 void OnGetRendererTcmalloc(); |
72 void OnSetTcmallocHeapProfiling(bool profiling, const std::string& prefix); | 72 void OnSetTcmallocHeapProfiling(bool profiling, const std::string& prefix); |
73 void OnWriteTcmallocHeapProfile(const FilePath::StringType& filename); | 73 void OnWriteTcmallocHeapProfile(const FilePath::StringType& filename); |
74 void OnGetV8HeapStats(); | 74 void OnGetV8HeapStats(); |
75 void OnPurgeMemory(); | 75 void OnPurgeMemory(); |
76 | 76 |
77 static bool is_incognito_process_; | 77 static bool is_incognito_process_; |
78 scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_; | 78 scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_; |
79 chrome::ChromeContentRendererClient* client_; | 79 chrome::ChromeContentRendererClient* client_; |
80 // If true, the web cache shall be cleared before the next navigation event. | 80 // If true, the web cache shall be cleared before the next navigation event. |
81 bool clear_cache_pending_; | 81 bool clear_cache_pending_; |
82 ContentSettings default_content_settings_; | 82 ContentSettings default_content_settings_; |
83 ContentSettingsForOneType image_setting_rules_; | 83 RendererContentSettingRules content_setting_rules_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver); | 85 DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver); |
86 }; | 86 }; |
87 | 87 |
88 #endif // CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ | 88 #endif // CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ |
OLD | NEW |