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

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

Issue 14769004: Translate: infobars should not appear when a page has a refresh meta tag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (rebase) Created 7 years, 7 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 private: 54 private:
55 // Holds the information received in OnWebUIJavaScript for later use 55 // Holds the information received in OnWebUIJavaScript for later use
56 // to call EvaluateScript() to preload javascript for WebUI tests. 56 // to call EvaluateScript() to preload javascript for WebUI tests.
57 struct WebUIJavaScript { 57 struct WebUIJavaScript {
58 string16 frame_xpath; 58 string16 frame_xpath;
59 string16 jscript; 59 string16 jscript;
60 int id; 60 int id;
61 bool notify_result; 61 bool notify_result;
62 }; 62 };
63 63
64 static bool HasRefreshMetaTag(WebKit::WebFrame* frame);
65
64 // RenderViewObserver implementation. 66 // RenderViewObserver implementation.
65 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 67 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
66 virtual void DidStartLoading() OVERRIDE; 68 virtual void DidStartLoading() OVERRIDE;
67 virtual void DidStopLoading() OVERRIDE; 69 virtual void DidStopLoading() OVERRIDE;
68 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, 70 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame,
69 bool is_new_navigation) OVERRIDE; 71 bool is_new_navigation) OVERRIDE;
70 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; 72 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE;
71 virtual void DidHandleGestureEvent( 73 virtual void DidHandleGestureEvent(
72 const WebKit::WebGestureEvent& event) OVERRIDE; 74 const WebKit::WebGestureEvent& event) OVERRIDE;
73 75
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void OnSetIsPrerendering(bool is_prerendering); 135 void OnSetIsPrerendering(bool is_prerendering);
134 void OnSetAllowDisplayingInsecureContent(bool allow); 136 void OnSetAllowDisplayingInsecureContent(bool allow);
135 void OnSetAllowRunningInsecureContent(bool allow); 137 void OnSetAllowRunningInsecureContent(bool allow);
136 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); 138 void OnSetClientSidePhishingDetection(bool enable_phishing_detection);
137 void OnSetVisuallyDeemphasized(bool deemphasized); 139 void OnSetVisuallyDeemphasized(bool deemphasized);
138 void OnStartFrameSniffer(const string16& frame_name); 140 void OnStartFrameSniffer(const string16& frame_name);
139 void OnGetFPS(); 141 void OnGetFPS();
140 void OnAddStrictSecurityHost(const std::string& host); 142 void OnAddStrictSecurityHost(const std::string& host);
141 void OnNPAPINotSupported(); 143 void OnNPAPINotSupported();
142 144
143 void CapturePageInfoLater(bool preliminary_capture, base::TimeDelta delay); 145 void CapturePageInfoLater(int page_id,
146 bool preliminary_capture,
147 base::TimeDelta delay);
144 148
145 // Captures the thumbnail and text contents for indexing for the given load 149 // Captures the thumbnail and text contents for indexing for the given load
146 // ID. Kicks off analysis of the captured text. 150 // ID. Kicks off analysis of the captured text.
147 void CapturePageInfo(bool preliminary_capture); 151 void CapturePageInfo(int page_id, bool preliminary_capture);
148 152
149 // Retrieves the text from the given frame contents, the page text up to the 153 // Retrieves the text from the given frame contents, the page text up to the
150 // maximum amount kMaxIndexChars will be placed into the given buffer. 154 // maximum amount kMaxIndexChars will be placed into the given buffer.
151 void CaptureText(WebKit::WebFrame* frame, string16* contents); 155 void CaptureText(WebKit::WebFrame* frame, string16* contents);
152 156
153 ExternalHostBindings* GetExternalHostBindings(); 157 ExternalHostBindings* GetExternalHostBindings();
154 158
155 // Determines if a host is in the strict security host set. 159 // Determines if a host is in the strict security host set.
156 bool IsStrictSecurityHost(const std::string& host); 160 bool IsStrictSecurityHost(const std::string& host);
157 161
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // A color page overlay when visually de-emaphasized. 195 // A color page overlay when visually de-emaphasized.
192 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; 196 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_;
193 197
194 // Used to delay calling CapturePageInfo. 198 // Used to delay calling CapturePageInfo.
195 base::Timer capture_timer_; 199 base::Timer capture_timer_;
196 200
197 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); 201 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver);
198 }; 202 };
199 203
200 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ 204 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/chrome_render_view_observer.cc » ('j') | chrome/renderer/chrome_render_view_observer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698