| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/common/content_settings.h" |
| 14 #include "content/public/renderer/render_process_observer.h" | 15 #include "content/public/renderer/render_process_observer.h" |
| 15 | 16 |
| 16 class GURL; | 17 class GURL; |
| 17 struct ContentSettings; | 18 struct ContentSettings; |
| 18 | 19 |
| 19 namespace chrome { | 20 namespace chrome { |
| 20 class ChromeContentRendererClient; | 21 class ChromeContentRendererClient; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace content { | 24 namespace content { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 // RenderProcessObserver implementation. | 45 // RenderProcessObserver implementation. |
| 45 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 46 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
| 46 virtual void WebKitInitialized() OVERRIDE; | 47 virtual void WebKitInitialized() OVERRIDE; |
| 47 | 48 |
| 48 void OnSetIsIncognitoProcess(bool is_incognito_process); | 49 void OnSetIsIncognitoProcess(bool is_incognito_process); |
| 49 void OnSetContentSettingsForCurrentURL( | 50 void OnSetContentSettingsForCurrentURL( |
| 50 const GURL& url, const ContentSettings& content_settings); | 51 const GURL& url, const ContentSettings& content_settings); |
| 51 void OnSetDefaultContentSettings(const ContentSettings& content_settings); | 52 void OnSetDefaultContentSettings(const ContentSettings& content_settings); |
| 53 void OnSetImageSettingRules(const ContentSettingsForOneType& settings); |
| 52 void OnSetCacheCapacities(size_t min_dead_capacity, | 54 void OnSetCacheCapacities(size_t min_dead_capacity, |
| 53 size_t max_dead_capacity, | 55 size_t max_dead_capacity, |
| 54 size_t capacity); | 56 size_t capacity); |
| 55 // If |on_navigation| is true, the clearing is delayed until the next | 57 // If |on_navigation| is true, the clearing is delayed until the next |
| 56 // navigation event. | 58 // navigation event. |
| 57 void OnClearCache(bool on_navigation); | 59 void OnClearCache(bool on_navigation); |
| 58 void OnGetCacheResourceStats(); | 60 void OnGetCacheResourceStats(); |
| 59 void OnSetFieldTrialGroup(const std::string& fiel_trial_name, | 61 void OnSetFieldTrialGroup(const std::string& fiel_trial_name, |
| 60 const std::string& group_name); | 62 const std::string& group_name); |
| 61 void OnGetRendererTcmalloc(); | 63 void OnGetRendererTcmalloc(); |
| 62 void OnSetTcmallocHeapProfiling(bool profiling, const std::string& prefix); | 64 void OnSetTcmallocHeapProfiling(bool profiling, const std::string& prefix); |
| 63 void OnWriteTcmallocHeapProfile(const FilePath::StringType& filename); | 65 void OnWriteTcmallocHeapProfile(const FilePath::StringType& filename); |
| 64 void OnGetV8HeapStats(); | 66 void OnGetV8HeapStats(); |
| 65 void OnPurgeMemory(); | 67 void OnPurgeMemory(); |
| 66 | 68 |
| 67 static bool is_incognito_process_; | 69 static bool is_incognito_process_; |
| 68 scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_; | 70 scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_; |
| 69 chrome::ChromeContentRendererClient* client_; | 71 chrome::ChromeContentRendererClient* client_; |
| 70 // If true, the web cache shall be cleared before the next navigation event. | 72 // If true, the web cache shall be cleared before the next navigation event. |
| 71 bool clear_cache_pending_; | 73 bool clear_cache_pending_; |
| 74 ContentSettingsForOneType image_setting_rules_; |
| 72 | 75 |
| 73 DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver); | 76 DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver); |
| 74 }; | 77 }; |
| 75 | 78 |
| 76 #endif // CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ | 79 #endif // CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_ |
| OLD | NEW |