Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / renderer / chrome_render_view_observer.h
index 4dbdbb8..b2df6e2 100644 (file)
 #include "ui/gfx/size.h"
 #include "url/gurl.h"
 
-class ChromeRenderProcessObserver;
 class ContentSettingsObserver;
 class SkBitmap;
-class TranslateHelper;
 class WebViewColorOverlay;
 class WebViewAnimatingOverlay;
 
@@ -34,6 +32,14 @@ namespace safe_browsing {
 class PhishingClassifierDelegate;
 }
 
+namespace translate {
+class TranslateHelper;
+}
+
+namespace web_cache {
+class WebCacheRenderProcessObserver;
+}
+
 // This class holds the Chrome specific parts of RenderView, and has the same
 // lifetime.
 class ChromeRenderViewObserver : public content::RenderViewObserver {
@@ -41,7 +47,8 @@ class ChromeRenderViewObserver : public content::RenderViewObserver {
   // translate_helper can be NULL.
   ChromeRenderViewObserver(
       content::RenderView* render_view,
-      ChromeRenderProcessObserver* chrome_render_process_observer);
+      web_cache::WebCacheRenderProcessObserver*
+          web_cache_render_process_observer);
   virtual ~ChromeRenderViewObserver();
 
  private:
@@ -51,34 +58,31 @@ class ChromeRenderViewObserver : public content::RenderViewObserver {
   virtual void DidStopLoading() OVERRIDE;
   virtual void DidCommitProvisionalLoad(blink::WebLocalFrame* frame,
                                         bool is_new_navigation) OVERRIDE;
-  virtual void DetailedConsoleMessageAdded(const base::string16& message,
-                                           const base::string16& source,
-                                           const base::string16& stack_trace,
-                                           int32 line_number,
-                                           int32 severity_level) OVERRIDE;
   virtual void Navigate(const GURL& url) OVERRIDE;
 
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
   void OnWebUIJavaScript(const base::string16& javascript);
-  void OnSetClientSidePhishingDetection(bool enable_phishing_detection);
+#endif
+#if defined(ENABLE_EXTENSIONS)
   void OnSetVisuallyDeemphasized(bool deemphasized);
-  void OnGetFPS();
+#endif
 #if defined(OS_ANDROID)
   void OnUpdateTopControlsState(content::TopControlsState constraints,
                                 content::TopControlsState current,
                                 bool animate);
-  void OnRetrieveWebappInformation(const GURL& expected_url);
   void OnRetrieveMetaTagContent(const GURL& expected_url,
                                 const std::string tag_name);
 #endif
+  void OnGetWebApplicationInfo();
+  void OnSetClientSidePhishingDetection(bool enable_phishing_detection);
   void OnSetWindowFeatures(const blink::WebWindowFeatures& window_features);
 
-  void CapturePageInfoLater(int page_id,
-                            bool preliminary_capture,
+  void CapturePageInfoLater(bool preliminary_capture,
                             base::TimeDelta delay);
 
   // Captures the thumbnail and text contents for indexing for the given load
   // ID.  Kicks off analysis of the captured text.
-  void CapturePageInfo(int page_id, bool preliminary_capture);
+  void CapturePageInfo(bool preliminary_capture);
 
   // Retrieves the text from the given frame contents, the page text up to the
   // maximum amount kMaxIndexChars will be placed into the given buffer.
@@ -91,23 +95,15 @@ class ChromeRenderViewObserver : public content::RenderViewObserver {
   bool HasRefreshMetaTag(blink::WebFrame* frame);
 
   // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received.
-  base::string16 webui_javascript_;
+  std::vector<base::string16> webui_javascript_;
 
   // Owned by ChromeContentRendererClient and outlive us.
-  ChromeRenderProcessObserver* chrome_render_process_observer_;
+  web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer_;
 
   // Have the same lifetime as us.
-  TranslateHelper* translate_helper_;
+  translate::TranslateHelper* translate_helper_;
   safe_browsing::PhishingClassifierDelegate* phishing_classifier_;
 
-  // Page_id from the last page we indexed. This prevents us from indexing the
-  // same page twice in a row.
-  int32 last_indexed_page_id_;
-  // The toplevel URL that was last indexed.  This is used together with the
-  // page id to decide whether to reindex in certain cases like history
-  // replacement.
-  GURL last_indexed_url_;
-
   // A color page overlay when visually de-emaphasized.
   scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_;