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

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

Issue 2179903005: [Prerender] Change IPC from bool to enum for more prerender modes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetchProto
Patch Set: Rebase Created 4 years, 4 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
« no previous file with comments | « chrome/common/prerender_types.h ('k') | chrome/renderer/chrome_render_frame_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
36 // RenderFrameObserver implementation. 37 // RenderFrameObserver implementation.
37 bool OnMessageReceived(const IPC::Message& message) override; 38 bool OnMessageReceived(const IPC::Message& message) override;
38 void DidStartProvisionalLoad() override; 39 void DidStartProvisionalLoad() override;
39 void DidFinishLoad() override; 40 void DidFinishLoad() override;
40 void DidCommitProvisionalLoad(bool is_new_navigation, 41 void DidCommitProvisionalLoad(bool is_new_navigation,
41 bool is_same_page_navigation) override; 42 bool is_same_page_navigation) override;
42 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override; 43 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override;
43 void OnDestruct() override; 44 void OnDestruct() override;
44 45
45 // IPC handlers 46 // IPC handlers
46 void OnSetIsPrerendering(bool is_prerendering); 47 void OnSetIsPrerendering(prerender::PrerenderMode mode);
47 void OnRequestReloadImageForContextNode(); 48 void OnRequestReloadImageForContextNode();
48 void OnRequestThumbnailForContextNode( 49 void OnRequestThumbnailForContextNode(
49 int thumbnail_min_area_pixels, 50 int thumbnail_min_area_pixels,
50 const gfx::Size& thumbnail_max_size_pixels, 51 const gfx::Size& thumbnail_max_size_pixels,
51 int callback_id); 52 int callback_id);
52 void OnPrintNodeUnderContextMenu(); 53 void OnPrintNodeUnderContextMenu();
53 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); 54 void OnSetClientSidePhishingDetection(bool enable_phishing_detection);
54 void OnAppBannerPromptRequest(int request_id, 55 void OnAppBannerPromptRequest(int request_id,
55 const std::string& platform); 56 const std::string& platform);
56 57
57 // Captures page information using the top (main) frame of a frame tree. 58 // Captures page information using the top (main) frame of a frame tree.
58 // Currently, this page information is just the text content of the all 59 // Currently, this page information is just the text content of the all
59 // frames, collected and concatenated until a certain limit (kMaxIndexChars) 60 // frames, collected and concatenated until a certain limit (kMaxIndexChars)
60 // is reached. 61 // is reached.
61 // TODO(dglazkov): This is incompatible with OOPIF and needs to be updated. 62 // TODO(dglazkov): This is incompatible with OOPIF and needs to be updated.
62 void CapturePageText(TextCaptureType capture_type); 63 void CapturePageText(TextCaptureType capture_type);
63 64
64 void CapturePageTextLater(TextCaptureType capture_type, 65 void CapturePageTextLater(TextCaptureType capture_type,
65 base::TimeDelta delay); 66 base::TimeDelta delay);
66 67
67 // Have the same lifetime as us. 68 // Have the same lifetime as us.
68 translate::TranslateHelper* translate_helper_; 69 translate::TranslateHelper* translate_helper_;
69 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; 70 safe_browsing::PhishingClassifierDelegate* phishing_classifier_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver); 72 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver);
72 }; 73 };
73 74
74 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ 75 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/common/prerender_types.h ('k') | chrome/renderer/chrome_render_frame_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698