| Index: components/web_cache/renderer/web_cache_render_process_observer.h
|
| diff --git a/chrome/renderer/chrome_render_process_observer.h b/components/web_cache/renderer/web_cache_render_process_observer.h
|
| similarity index 38%
|
| copy from chrome/renderer/chrome_render_process_observer.h
|
| copy to components/web_cache/renderer/web_cache_render_process_observer.h
|
| index 7035135b99f23e47a8807d96e93151b21875fc48..6f49a3cc8f353dbcfa03e0ea344723db9e3e9846 100644
|
| --- a/chrome/renderer/chrome_render_process_observer.h
|
| +++ b/components/web_cache/renderer/web_cache_render_process_observer.h
|
| @@ -1,80 +1,51 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright 2014 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 CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_
|
| -#define CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_
|
| -
|
| -#include <string>
|
| +#ifndef COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
|
| +#define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
|
|
|
| #include "base/compiler_specific.h"
|
| -#include "base/files/file_path.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| -#include "chrome/common/content_settings.h"
|
| +#include "base/macros.h"
|
| #include "content/public/renderer/render_process_observer.h"
|
|
|
| -class ChromeContentRendererClient;
|
| -class GURL;
|
| -struct ContentSettings;
|
| -
|
| -namespace content {
|
| -class ResourceDispatcherDelegate;
|
| -}
|
| +namespace web_cache {
|
|
|
| -// This class filters the incoming control messages (i.e. ones not destined for
|
| -// a RenderView) for Chrome specific messages that the content layer doesn't
|
| -// happen. If a few messages are related, they should probably have their own
|
| -// observer.
|
| -class ChromeRenderProcessObserver : public content::RenderProcessObserver {
|
| +// This class filters the incoming cache related control messages.
|
| +class WebCacheRenderProcessObserver : public content::RenderProcessObserver {
|
| public:
|
| - explicit ChromeRenderProcessObserver(
|
| - ChromeContentRendererClient* client);
|
| - virtual ~ChromeRenderProcessObserver();
|
| -
|
| - static bool is_incognito_process() { return is_incognito_process_; }
|
| + WebCacheRenderProcessObserver();
|
| + virtual ~WebCacheRenderProcessObserver();
|
|
|
| // Needs to be called by RenderViews in case of navigations to execute
|
| // any 'clear cache' commands that were delayed until the next navigation.
|
| void ExecutePendingClearCache();
|
|
|
| - // Returns a pointer to the content setting rules owned by
|
| - // |ChromeRenderProcessObserver|.
|
| - const RendererContentSettingRules* content_setting_rules() const;
|
| -
|
| private:
|
| // RenderProcessObserver implementation.
|
| virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
|
| virtual void WebKitInitialized() OVERRIDE;
|
| virtual void OnRenderProcessShutdown() OVERRIDE;
|
|
|
| - void OnSetIsIncognitoProcess(bool is_incognito_process);
|
| - void OnSetContentSettingsForCurrentURL(
|
| - const GURL& url, const ContentSettings& content_settings);
|
| - void OnSetContentSettingRules(const RendererContentSettingRules& rules);
|
| + // Message handlers.
|
| void OnSetCacheCapacities(size_t min_dead_capacity,
|
| size_t max_dead_capacity,
|
| size_t capacity);
|
| // If |on_navigation| is true, the clearing is delayed until the next
|
| // navigation event.
|
| void OnClearCache(bool on_navigation);
|
| - void OnGetCacheResourceStats();
|
| - void OnSetFieldTrialGroup(const std::string& fiel_trial_name,
|
| - const std::string& group_name);
|
| - void OnGetV8HeapStats();
|
|
|
| - static bool is_incognito_process_;
|
| - scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_;
|
| - ChromeContentRendererClient* client_;
|
| // If true, the web cache shall be cleared before the next navigation event.
|
| bool clear_cache_pending_;
|
| - RendererContentSettingRules content_setting_rules_;
|
| -
|
| bool webkit_initialized_;
|
| size_t pending_cache_min_dead_capacity_;
|
| size_t pending_cache_max_dead_capacity_;
|
| size_t pending_cache_capacity_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver);
|
| + DISALLOW_COPY_AND_ASSIGN(WebCacheRenderProcessObserver);
|
| };
|
|
|
| -#endif // CHROME_RENDERER_CHROME_RENDER_PROCESS_OBSERVER_H_
|
| +} // namespace web_cache
|
| +
|
| +#endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
|
| +
|
|
|