| 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> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 web_cache_render_process_observer); | 49 web_cache_render_process_observer); |
| 50 ~ChromeRenderViewObserver() override; | 50 ~ChromeRenderViewObserver() override; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 // RenderViewObserver implementation. | 53 // RenderViewObserver implementation. |
| 54 bool OnMessageReceived(const IPC::Message& message) override; | 54 bool OnMessageReceived(const IPC::Message& message) override; |
| 55 void DidStartLoading() override; | 55 void DidStartLoading() override; |
| 56 void DidStopLoading() override; | 56 void DidStopLoading() override; |
| 57 void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, | 57 void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, |
| 58 bool is_new_navigation) override; | 58 bool is_new_navigation) override; |
| 59 void DidFirstLayoutAfterFinishedParsing() override; |
| 59 void Navigate(const GURL& url) override; | 60 void Navigate(const GURL& url) override; |
| 60 | 61 |
| 61 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 62 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 62 void OnWebUIJavaScript(const base::string16& javascript); | 63 void OnWebUIJavaScript(const base::string16& javascript); |
| 63 #endif | 64 #endif |
| 64 #if defined(ENABLE_EXTENSIONS) | 65 #if defined(ENABLE_EXTENSIONS) |
| 65 void OnSetVisuallyDeemphasized(bool deemphasized); | 66 void OnSetVisuallyDeemphasized(bool deemphasized); |
| 66 #endif | 67 #endif |
| 67 #if defined(OS_ANDROID) | 68 #if defined(OS_ANDROID) |
| 68 void OnUpdateTopControlsState(content::TopControlsState constraints, | 69 void OnUpdateTopControlsState(content::TopControlsState constraints, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 80 // ID. Kicks off analysis of the captured text. | 81 // ID. Kicks off analysis of the captured text. |
| 81 void CapturePageInfo(bool preliminary_capture); | 82 void CapturePageInfo(bool preliminary_capture); |
| 82 | 83 |
| 83 // Retrieves the text from the given frame contents, the page text up to the | 84 // Retrieves the text from the given frame contents, the page text up to the |
| 84 // maximum amount kMaxIndexChars will be placed into the given buffer. | 85 // maximum amount kMaxIndexChars will be placed into the given buffer. |
| 85 void CaptureText(blink::WebFrame* frame, base::string16* contents); | 86 void CaptureText(blink::WebFrame* frame, base::string16* contents); |
| 86 | 87 |
| 87 // Determines if a host is in the strict security host set. | 88 // Determines if a host is in the strict security host set. |
| 88 bool IsStrictSecurityHost(const std::string& host); | 89 bool IsStrictSecurityHost(const std::string& host); |
| 89 | 90 |
| 90 // Checks if a page contains <meta http-equiv="refresh" ...> tag. | |
| 91 bool HasRefreshMetaTag(blink::WebFrame* frame); | |
| 92 | |
| 93 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. | 91 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. |
| 94 std::vector<base::string16> webui_javascript_; | 92 std::vector<base::string16> webui_javascript_; |
| 95 | 93 |
| 96 // Owned by ChromeContentRendererClient and outlive us. | 94 // Owned by ChromeContentRendererClient and outlive us. |
| 97 web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer_; | 95 web_cache::WebCacheRenderProcessObserver* web_cache_render_process_observer_; |
| 98 | 96 |
| 99 // Have the same lifetime as us. | 97 // Have the same lifetime as us. |
| 100 translate::TranslateHelper* translate_helper_; | 98 translate::TranslateHelper* translate_helper_; |
| 101 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; | 99 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; |
| 102 | 100 |
| 103 // true if webview is overlayed with grey color. | 101 // true if webview is overlayed with grey color. |
| 104 bool webview_visually_deemphasized_; | 102 bool webview_visually_deemphasized_; |
| 105 | 103 |
| 106 // Used to delay calling CapturePageInfo. | 104 // Used to delay calling CapturePageInfo. |
| 107 base::Timer capture_timer_; | 105 base::Timer capture_timer_; |
| 108 | 106 |
| 109 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); | 107 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); |
| 110 }; | 108 }; |
| 111 | 109 |
| 112 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 110 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
| OLD | NEW |