OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ |
6 #define CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ | 6 #define CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "chrome/common/prerender_types.h" |
10 #include "content/public/renderer/render_frame_observer.h" | 11 #include "content/public/renderer/render_frame_observer.h" |
11 | 12 |
12 class GURL; | 13 class GURL; |
13 | 14 |
14 namespace gfx { | 15 namespace gfx { |
15 class Size; | 16 class Size; |
16 } | 17 } |
17 | 18 |
18 namespace safe_browsing { | 19 namespace safe_browsing { |
19 class PhishingClassifierDelegate; | 20 class PhishingClassifierDelegate; |
(...skipping 17 matching lines...) Expand all Loading... |
37 bool OnMessageReceived(const IPC::Message& message) override; | 38 bool OnMessageReceived(const IPC::Message& message) override; |
38 void DidFinishDocumentLoad() override; | 39 void DidFinishDocumentLoad() override; |
39 void DidStartProvisionalLoad() override; | 40 void DidStartProvisionalLoad() override; |
40 void DidFinishLoad() override; | 41 void DidFinishLoad() override; |
41 void DidCommitProvisionalLoad(bool is_new_navigation, | 42 void DidCommitProvisionalLoad(bool is_new_navigation, |
42 bool is_same_page_navigation) override; | 43 bool is_same_page_navigation) override; |
43 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override; | 44 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override; |
44 void OnDestruct() override; | 45 void OnDestruct() override; |
45 | 46 |
46 // IPC handlers | 47 // IPC handlers |
47 void OnSetIsPrerendering(bool is_prerendering); | 48 void OnSetIsPrerendering(prerender::PrerenderMode mode); |
48 void OnRequestReloadImageForContextNode(); | 49 void OnRequestReloadImageForContextNode(); |
49 void OnRequestThumbnailForContextNode( | 50 void OnRequestThumbnailForContextNode( |
50 int thumbnail_min_area_pixels, | 51 int thumbnail_min_area_pixels, |
51 const gfx::Size& thumbnail_max_size_pixels, | 52 const gfx::Size& thumbnail_max_size_pixels, |
52 int callback_id); | 53 int callback_id); |
53 void OnPrintNodeUnderContextMenu(); | 54 void OnPrintNodeUnderContextMenu(); |
54 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); | 55 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); |
55 void OnAppBannerPromptRequest(int request_id, | 56 void OnAppBannerPromptRequest(int request_id, |
56 const std::string& platform); | 57 const std::string& platform); |
57 | 58 |
58 // Captures page information using the top (main) frame of a frame tree. | 59 // Captures page information using the top (main) frame of a frame tree. |
59 // Currently, this page information is just the text content of the all | 60 // Currently, this page information is just the text content of the all |
60 // frames, collected and concatenated until a certain limit (kMaxIndexChars) | 61 // frames, collected and concatenated until a certain limit (kMaxIndexChars) |
61 // is reached. | 62 // is reached. |
62 // TODO(dglazkov): This is incompatible with OOPIF and needs to be updated. | 63 // TODO(dglazkov): This is incompatible with OOPIF and needs to be updated. |
63 void CapturePageText(TextCaptureType capture_type); | 64 void CapturePageText(TextCaptureType capture_type); |
64 | 65 |
65 void CapturePageTextLater(TextCaptureType capture_type, | 66 void CapturePageTextLater(TextCaptureType capture_type, |
66 base::TimeDelta delay); | 67 base::TimeDelta delay); |
67 | 68 |
68 // Have the same lifetime as us. | 69 // Have the same lifetime as us. |
69 translate::TranslateHelper* translate_helper_; | 70 translate::TranslateHelper* translate_helper_; |
70 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; | 71 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; |
71 | 72 |
72 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver); | 73 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver); |
73 }; | 74 }; |
74 | 75 |
75 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ | 76 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ |
OLD | NEW |