Chromium Code Reviews| 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 23 matching lines...) Expand all Loading... | |
| 34 explicit ChromeRenderProcessObserver( | 34 explicit ChromeRenderProcessObserver( |
| 35 chrome::ChromeContentRendererClient* client); | 35 chrome::ChromeContentRendererClient* client); |
| 36 virtual ~ChromeRenderProcessObserver(); | 36 virtual ~ChromeRenderProcessObserver(); |
| 37 | 37 |
| 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 image setting rules owned by | 44 // Returns a pointer to the content setting rules owned by |
| 45 // |ChromeRenderProcessObserver|. | 45 // |ChromeRenderProcessObserver|. |
| 46 const ContentSettingsForOneType* image_setting_rules() const; | 46 const ContentSettingsForOneType* content_setting_rules() const; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // RenderProcessObserver implementation. | 49 // RenderProcessObserver implementation. |
| 50 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 50 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
| 51 virtual void WebKitInitialized() OVERRIDE; | 51 virtual void WebKitInitialized() OVERRIDE; |
| 52 | 52 |
| 53 void OnSetIsIncognitoProcess(bool is_incognito_process); | 53 void OnSetIsIncognitoProcess(bool is_incognito_process); |
| 54 void OnSetContentSettingsForCurrentURL( | 54 void OnSetContentSettingsForCurrentURL( |
| 55 const GURL& url, const ContentSettings& content_settings); | 55 const GURL& url, const ContentSettings& content_settings); |
| 56 void OnSetDefaultContentSettings(const ContentSettings& content_settings); | 56 void OnSetDefaultContentSettings(const ContentSettings& content_settings); |
| 57 void OnSetImageSettingRules(const ContentSettingsForOneType& settings); | 57 void OnSetContentSettingRules(ContentSettingsType type, |
| 58 const ContentSettingsForOneType& settings); | |
| 58 void OnSetCacheCapacities(size_t min_dead_capacity, | 59 void OnSetCacheCapacities(size_t min_dead_capacity, |
| 59 size_t max_dead_capacity, | 60 size_t max_dead_capacity, |
| 60 size_t capacity); | 61 size_t capacity); |
| 61 // If |on_navigation| is true, the clearing is delayed until the next | 62 // If |on_navigation| is true, the clearing is delayed until the next |
| 62 // navigation event. | 63 // navigation event. |
| 63 void OnClearCache(bool on_navigation); | 64 void OnClearCache(bool on_navigation); |
| 64 void OnGetCacheResourceStats(); | 65 void OnGetCacheResourceStats(); |
| 65 void OnSetFieldTrialGroup(const std::string& fiel_trial_name, | 66 void OnSetFieldTrialGroup(const std::string& fiel_trial_name, |
| 66 const std::string& group_name); | 67 const std::string& group_name); |
| 67 void OnGetRendererTcmalloc(); | 68 void OnGetRendererTcmalloc(); |
| 68 void OnSetTcmallocHeapProfiling(bool profiling, const std::string& prefix); | 69 void OnSetTcmallocHeapProfiling(bool profiling, const std::string& prefix); |
| 69 void OnWriteTcmallocHeapProfile(const FilePath::StringType& filename); | 70 void OnWriteTcmallocHeapProfile(const FilePath::StringType& filename); |
| 70 void OnGetV8HeapStats(); | 71 void OnGetV8HeapStats(); |
| 71 void OnPurgeMemory(); | 72 void OnPurgeMemory(); |
| 72 | 73 |
| 73 static bool is_incognito_process_; | 74 static bool is_incognito_process_; |
| 74 scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_; | 75 scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_; |
| 75 chrome::ChromeContentRendererClient* client_; | 76 chrome::ChromeContentRendererClient* client_; |
| 76 // If true, the web cache shall be cleared before the next navigation event. | 77 // If true, the web cache shall be cleared before the next navigation event. |
| 77 bool clear_cache_pending_; | 78 bool clear_cache_pending_; |
| 78 ContentSettingsForOneType image_setting_rules_; | 79 ContentSettingsForOneType content_setting_rules_[CONTENT_SETTINGS_NUM_TYPES]; |
|
Bernhard Bauer
2011/11/02 09:57:14
I actually want to get rid of indexing content set
marja
2011/11/02 14:46:35
Done: Added struct RendererContentSettingRules.
| |
| 79 | 80 |
| 80 DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver); | 81 DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver); |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 #endif // CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ | 84 #endif // CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ |
| OLD | NEW |