| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "content/public/renderer/render_frame_observer.h" | 10 #include "content/public/renderer/render_frame_observer.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 class ChromeRenderFrameObserver : public content::RenderFrameObserver, | 76 class ChromeRenderFrameObserver : public content::RenderFrameObserver, |
| 77 public PageInfoReceiver { | 77 public PageInfoReceiver { |
| 78 public: | 78 public: |
| 79 explicit ChromeRenderFrameObserver(content::RenderFrame* render_frame); | 79 explicit ChromeRenderFrameObserver(content::RenderFrame* render_frame); |
| 80 ~ChromeRenderFrameObserver() override; | 80 ~ChromeRenderFrameObserver() override; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 // RenderFrameObserver implementation. | 83 // RenderFrameObserver implementation. |
| 84 bool OnMessageReceived(const IPC::Message& message) override; | 84 bool OnMessageReceived(const IPC::Message& message) override; |
| 85 void DidFinishDocumentLoad() override; | 85 void DidFinishDocumentLoad() override; |
| 86 void DidStartProvisionalLoad() override; | 86 void DidStartProvisionalLoad(blink::WebDataSource* datasource) override; |
| 87 void DidFinishLoad() override; | 87 void DidFinishLoad() override; |
| 88 void DidCommitProvisionalLoad(bool is_new_navigation, | 88 void DidCommitProvisionalLoad(bool is_new_navigation, |
| 89 bool is_same_page_navigation) override; | 89 bool is_same_page_navigation) override; |
| 90 | 90 |
| 91 // IPC handlers | 91 // IPC handlers |
| 92 void OnSetIsPrerendering(bool is_prerendering); | 92 void OnSetIsPrerendering(bool is_prerendering); |
| 93 void OnRequestReloadImageForContextNode(); | 93 void OnRequestReloadImageForContextNode(); |
| 94 void OnRequestThumbnailForContextNode( | 94 void OnRequestThumbnailForContextNode( |
| 95 int thumbnail_min_area_pixels, | 95 int thumbnail_min_area_pixels, |
| 96 const gfx::Size& thumbnail_max_size_pixels); | 96 const gfx::Size& thumbnail_max_size_pixels); |
| 97 void OnPrintNodeUnderContextMenu(); | 97 void OnPrintNodeUnderContextMenu(); |
| 98 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); | 98 void OnSetClientSidePhishingDetection(bool enable_phishing_detection); |
| 99 void OnAppBannerPromptRequest(int request_id, | 99 void OnAppBannerPromptRequest(int request_id, |
| 100 const std::string& platform); | 100 const std::string& platform); |
| 101 void OnAppBannerDebugMessageRequest(const std::string& message); | 101 void OnAppBannerDebugMessageRequest(const std::string& message); |
| 102 | 102 |
| 103 // PageInfoReceiver implementation. | 103 // PageInfoReceiver implementation. |
| 104 void PageCaptured(base::string16* content, CaptureType capture_type) override; | 104 void PageCaptured(base::string16* content, CaptureType capture_type) override; |
| 105 | 105 |
| 106 // Have the same lifetime as us. | 106 // Have the same lifetime as us. |
| 107 translate::TranslateHelper* translate_helper_; | 107 translate::TranslateHelper* translate_helper_; |
| 108 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; | 108 safe_browsing::PhishingClassifierDelegate* phishing_classifier_; |
| 109 | 109 |
| 110 PageInfo page_info_; | 110 PageInfo page_info_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver); | 112 DISALLOW_COPY_AND_ASSIGN(ChromeRenderFrameObserver); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ | 115 #endif // CHROME_RENDERER_CHROME_RENDER_FRAME_OBSERVER_H_ |
| OLD | NEW |