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/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/timer.h" | 14 #include "base/timer.h" |
15 #include "chrome/common/extensions/permissions/api_permission.h" | 15 #include "chrome/common/extensions/permissions/api_permission.h" |
| 16 #include "content/public/common/top_controls_state.h" |
16 #include "content/public/renderer/render_view_observer.h" | 17 #include "content/public/renderer/render_view_observer.h" |
17 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPermissionClient.h
" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPermissionClient.h
" |
19 | 20 |
20 class ChromeRenderProcessObserver; | 21 class ChromeRenderProcessObserver; |
21 class ContentSettingsObserver; | 22 class ContentSettingsObserver; |
22 class ExternalHostBindings; | 23 class ExternalHostBindings; |
23 class SkBitmap; | 24 class SkBitmap; |
24 class TranslateHelper; | 25 class TranslateHelper; |
25 class WebViewColorOverlay; | 26 class WebViewColorOverlay; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 void OnJavaScriptStressTestControl(int cmd, int param); | 133 void OnJavaScriptStressTestControl(int cmd, int param); |
133 void OnSetIsPrerendering(bool is_prerendering); | 134 void OnSetIsPrerendering(bool is_prerendering); |
134 void OnSetAllowDisplayingInsecureContent(bool allow); | 135 void OnSetAllowDisplayingInsecureContent(bool allow); |
135 void OnSetAllowRunningInsecureContent(bool allow); | 136 void OnSetAllowRunningInsecureContent(bool allow); |
136 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); | 137 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); |
137 void OnSetVisuallyDeemphasized(bool deemphasized); | 138 void OnSetVisuallyDeemphasized(bool deemphasized); |
138 void OnStartFrameSniffer(const string16& frame_name); | 139 void OnStartFrameSniffer(const string16& frame_name); |
139 void OnGetFPS(); | 140 void OnGetFPS(); |
140 void OnAddStrictSecurityHost(const std::string& host); | 141 void OnAddStrictSecurityHost(const std::string& host); |
141 void OnNPAPINotSupported(); | 142 void OnNPAPINotSupported(); |
| 143 #if defined(OS_ANDROID) |
| 144 void OnUpdateTopControlsState(content::TopControlsState constraints, |
| 145 content::TopControlsState current, |
| 146 bool animate); |
| 147 #endif |
142 | 148 |
143 void CapturePageInfoLater(bool preliminary_capture, base::TimeDelta delay); | 149 void CapturePageInfoLater(bool preliminary_capture, base::TimeDelta delay); |
144 | 150 |
145 // Captures the thumbnail and text contents for indexing for the given load | 151 // Captures the thumbnail and text contents for indexing for the given load |
146 // ID. Kicks off analysis of the captured text. | 152 // ID. Kicks off analysis of the captured text. |
147 void CapturePageInfo(bool preliminary_capture); | 153 void CapturePageInfo(bool preliminary_capture); |
148 | 154 |
149 // Retrieves the text from the given frame contents, the page text up to the | 155 // 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. | 156 // maximum amount kMaxIndexChars will be placed into the given buffer. |
151 void CaptureText(WebKit::WebFrame* frame, string16* contents); | 157 void CaptureText(WebKit::WebFrame* frame, string16* contents); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // A color page overlay when visually de-emaphasized. | 197 // A color page overlay when visually de-emaphasized. |
192 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; | 198 scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; |
193 | 199 |
194 // Used to delay calling CapturePageInfo. | 200 // Used to delay calling CapturePageInfo. |
195 base::Timer capture_timer_; | 201 base::Timer capture_timer_; |
196 | 202 |
197 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); | 203 DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); |
198 }; | 204 }; |
199 | 205 |
200 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ | 206 #endif // CHROME_RENDERER_CHROME_RENDER_VIEW_OBSERVER_H_ |
OLD | NEW |