| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEW_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| 6 #define CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 6 #define CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "content/public/common/top_controls_state.h" | 16 #include "content/public/common/top_controls_state.h" |
| 17 #include "content/public/renderer/render_view_observer.h" | 17 #include "content/public/renderer/render_view_observer.h" |
| 18 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 | 20 |
| 21 class ContentSettingsObserver; | 21 class ContentSettingsObserver; |
| 22 class SkBitmap; | 22 class SkBitmap; |
| 23 class TranslateHelper; | |
| 24 class WebViewColorOverlay; | 23 class WebViewColorOverlay; |
| 25 class WebViewAnimatingOverlay; | 24 class WebViewAnimatingOverlay; |
| 26 | 25 |
| 27 namespace blink { | 26 namespace blink { |
| 28 class WebView; | 27 class WebView; |
| 29 struct WebWindowFeatures; | 28 struct WebWindowFeatures; |
| 30 } | 29 } |
| 31 | 30 |
| 32 namespace safe_browsing { | 31 namespace safe_browsing { |
| 33 class PhishingClassifierDelegate; | 32 class PhishingClassifierDelegate; |
| 34 } | 33 } |
| 35 | 34 |
| 35 namespace translate { |
| 36 class TranslateHelper; |
| 37 } |
| 38 |
| 36 namespace web_cache { | 39 namespace web_cache { |
| 37 class WebCacheRenderProcessObserver; | 40 class WebCacheRenderProcessObserver; |
| 38 } | 41 } |
| 39 | 42 |
| 40 // This class holds the Chrome specific parts of RenderView, and has the same | 43 // This class holds the Chrome specific parts of RenderView, and has the same |
| 41 // lifetime. | 44 // lifetime. |
| 42 class ChromeRenderViewObserver : public content::RenderViewObserver { | 45 class ChromeRenderViewObserver : public content::RenderViewObserver { |
| 43 public: | 46 public: |
| 44 // translate_helper can be NULL. | 47 // translate_helper can be NULL. |
| 45 ChromeRenderViewObserver( | 48 ChromeRenderViewObserver( |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Checks if a page contains <meta http-equiv="refresh" ...> tag. | 94 // Checks if a page contains <meta http-equiv="refresh" ...> tag. |
| 92 bool HasRefreshMetaTag(blink::WebFrame* frame); | 95 bool HasRefreshMetaTag(blink::WebFrame* frame); |
| 93 | 96 |
| 94 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. | 97 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. |
| 95 std::vector<base::string16> webui_javascript_; | 98 std::vector<base::string16> webui_javascript_; |
| 96 | 99 |
| 97 // Owned by ChromeContentRendererClient and outlive us. | 100 // Owned by ChromeContentRendererClient and outlive us. |
| 98 web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer_; | 101 web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer_; |
| 99 | 102 |
| 100 // Have the same lifetime as us. | 103 // Have the same lifetime as us. |
| 101 TranslateHelper* translate_helper_; | 104 translate::TranslateHelper* translate_helper_; |
| 102 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; | 105 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; |
| 103 | 106 |
| 104 // A color page overlay when visually de-emaphasized. | 107 // A color page overlay when visually de-emaphasized. |
| 105 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; | 108 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; |
| 106 | 109 |
| 107 // Used to delay calling CapturePageInfo. | 110 // Used to delay calling CapturePageInfo. |
| 108 base::Timer capture_timer_; | 111 base::Timer capture_timer_; |
| 109 | 112 |
| 110 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); | 113 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); |
| 111 }; | 114 }; |
| 112 | 115 |
| 113 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 116 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |