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 #include "chrome/renderer/chrome_render_frame_observer.h" | 5 #include "chrome/renderer/chrome_render_frame_observer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 thumbnail_data = std::string(data.begin(), data.end()); | 216 thumbnail_data = std::string(data.begin(), data.end()); |
217 } | 217 } |
218 | 218 |
219 Send(new ChromeViewHostMsg_RequestThumbnailForContextNode_ACK( | 219 Send(new ChromeViewHostMsg_RequestThumbnailForContextNode_ACK( |
220 routing_id(), thumbnail_data, original_size, callback_id)); | 220 routing_id(), thumbnail_data, original_size, callback_id)); |
221 } | 221 } |
222 | 222 |
223 void ChromeRenderFrameObserver::OnPrintNodeUnderContextMenu() { | 223 void ChromeRenderFrameObserver::OnPrintNodeUnderContextMenu() { |
224 #if defined(ENABLE_PRINTING) | 224 #if defined(ENABLE_PRINTING) |
225 printing::PrintWebViewHelper* helper = | 225 printing::PrintWebViewHelper* helper = |
226 printing::PrintWebViewHelper::Get(render_frame()->GetRenderView()); | 226 printing::PrintWebViewHelper::Get(render_frame()); |
227 if (helper) | 227 if (helper) |
228 helper->PrintNode(render_frame()->GetWebFrame()->contextMenuNode()); | 228 helper->PrintNode(render_frame()->GetWebFrame()->contextMenuNode()); |
229 #endif | 229 #endif |
230 } | 230 } |
231 | 231 |
232 void ChromeRenderFrameObserver::OnSetClientSidePhishingDetection( | 232 void ChromeRenderFrameObserver::OnSetClientSidePhishingDetection( |
233 bool enable_phishing_detection) { | 233 bool enable_phishing_detection) { |
234 #if defined(SAFE_BROWSING_CSD) | 234 #if defined(SAFE_BROWSING_CSD) |
235 phishing_classifier_ = | 235 phishing_classifier_ = |
236 enable_phishing_detection | 236 enable_phishing_detection |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 CapturePageText(FINAL_CAPTURE); | 364 CapturePageText(FINAL_CAPTURE); |
365 break; | 365 break; |
366 default: | 366 default: |
367 break; | 367 break; |
368 } | 368 } |
369 } | 369 } |
370 | 370 |
371 void ChromeRenderFrameObserver::OnDestruct() { | 371 void ChromeRenderFrameObserver::OnDestruct() { |
372 delete this; | 372 delete this; |
373 } | 373 } |
OLD | NEW |