Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: chrome/renderer/chrome_render_view_observer.h

Issue 363293005: Remove page id from "page capture". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test4sure Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void OnUpdateTopControlsState(content::TopControlsState constraints, 64 void OnUpdateTopControlsState(content::TopControlsState constraints,
65 content::TopControlsState current, 65 content::TopControlsState current,
66 bool animate); 66 bool animate);
67 void OnRetrieveWebappInformation(const GURL& expected_url); 67 void OnRetrieveWebappInformation(const GURL& expected_url);
68 void OnRetrieveMetaTagContent(const GURL& expected_url, 68 void OnRetrieveMetaTagContent(const GURL& expected_url,
69 const std::string tag_name); 69 const std::string tag_name);
70 #endif 70 #endif
71 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); 71 void OnSetClientSidePhishingDetection(bool enable_phishing_detection);
72 void OnSetWindowFeatures(const blink::WebWindowFeatures& window_features); 72 void OnSetWindowFeatures(const blink::WebWindowFeatures& window_features);
73 73
74 void CapturePageInfoLater(int page_id, 74 void CapturePageInfoLater(bool preliminary_capture,
75 bool preliminary_capture,
76 base::TimeDelta delay); 75 base::TimeDelta delay);
77 76
78 // Captures the thumbnail and text contents for indexing for the given load 77 // Captures text contents for indexing and analyzes the text.
79 // ID. Kicks off analysis of the captured text. 78 void CapturePageInfo(bool preliminary_capture);
80 void CapturePageInfo(int page_id, bool preliminary_capture);
81 79
82 // Retrieves the text from the given frame contents, the page text up to the 80 // Retrieves the text from the given frame contents, the page text up to the
83 // maximum amount kMaxIndexChars will be placed into the given buffer. 81 // maximum amount kMaxIndexChars will be placed into the given buffer.
84 void CaptureText(blink::WebFrame* frame, base::string16* contents); 82 void CaptureText(blink::WebFrame* frame, base::string16* contents);
85 83
86 // Determines if a host is in the strict security host set. 84 // Determines if a host is in the strict security host set.
87 bool IsStrictSecurityHost(const std::string& host); 85 bool IsStrictSecurityHost(const std::string& host);
88 86
89 // Checks if a page contains <meta http-equiv="refresh" ...> tag. 87 // Checks if a page contains <meta http-equiv="refresh" ...> tag.
90 bool HasRefreshMetaTag(blink::WebFrame* frame); 88 bool HasRefreshMetaTag(blink::WebFrame* frame);
91 89
92 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received. 90 // Save the JavaScript to preload if a ViewMsg_WebUIJavaScript is received.
93 std::vector<base::string16> webui_javascript_; 91 std::vector<base::string16> webui_javascript_;
94 92
95 // Owned by ChromeContentRendererClient and outlive us. 93 // Owned by ChromeContentRendererClient and outlive us.
96 ChromeRenderProcessObserver* chrome_render_process_observer_; 94 ChromeRenderProcessObserver* chrome_render_process_observer_;
97 95
98 // Have the same lifetime as us. 96 // Have the same lifetime as us.
99 TranslateHelper* translate_helper_; 97 TranslateHelper* translate_helper_;
100 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; 98 safe_browsing::PhishingClassifierDelegate* phishing_classifier_;
101 99
102 // Page_id from the last page we indexed. This prevents us from indexing the
103 // same page twice in a row.
104 int32 last_indexed_page_id_;
105 // The toplevel URL that was last indexed. This is used together with the
106 // page id to decide whether to reindex in certain cases like history
107 // replacement.
108 GURL last_indexed_url_;
109
110 // A color page overlay when visually de-emaphasized. 100 // A color page overlay when visually de-emaphasized.
111 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; 101 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_;
112 102
113 // Used to delay calling CapturePageInfo. 103 // Used to delay calling CapturePageInfo.
114 base::Timer capture_timer_; 104 base::Timer capture_timer_;
115 105
116 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); 106 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver);
117 }; 107 };
118 108
119 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ 109 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698