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

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

Issue 9705084: Block printing from blocked popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix init order Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/mock_printer.cc ('k') | chrome/renderer/print_web_view_helper.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 (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_PRINT_WEB_VIEW_HELPER_H_ 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 const printing::PageSizeMargins& page_layout_in_points, 305 const printing::PageSizeMargins& page_layout_in_points,
306 const base::DictionaryValue& header_footer_info); 306 const base::DictionaryValue& header_footer_info);
307 307
308 bool GetPrintFrame(WebKit::WebFrame** frame); 308 bool GetPrintFrame(WebKit::WebFrame** frame);
309 309
310 // This reports the current time - |start_time| as the time to render a page. 310 // This reports the current time - |start_time| as the time to render a page.
311 void ReportPreviewPageRenderTime(base::TimeTicks start_time); 311 void ReportPreviewPageRenderTime(base::TimeTicks start_time);
312 312
313 // Script Initiated Printing ------------------------------------------------ 313 // Script Initiated Printing ------------------------------------------------
314 314
315 // Return true if script initiated printing is currently allowed.
316 bool IsScriptInitiatedPrintAllowed(WebKit::WebFrame* frame);
317
315 // Returns true if script initiated printing occurs too often. 318 // Returns true if script initiated printing occurs too often.
316 bool IsScriptInitiatedPrintTooFrequent(WebKit::WebFrame* frame); 319 bool IsScriptInitiatedPrintTooFrequent(WebKit::WebFrame* frame);
317 320
318 // Reset the counter for script initiated printing. 321 // Reset the counter for script initiated printing.
319 // Scripted printing will be allowed to continue. 322 // Scripted printing will be allowed to continue.
320 void ResetScriptedPrintCount(); 323 void ResetScriptedPrintCount();
321 324
322 // Increment the counter for script initiated printing. 325 // Increment the counter for script initiated printing.
323 // Scripted printing will be blocked for a limited amount of time. 326 // Scripted printing will be blocked for a limited amount of time.
324 void IncrementScriptedPrintCount(); 327 void IncrementScriptedPrintCount();
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 466
464 State state_; 467 State state_;
465 }; 468 };
466 469
467 PrintPreviewContext print_preview_context_; 470 PrintPreviewContext print_preview_context_;
468 471
469 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 472 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
470 }; 473 };
471 474
472 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 475 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/mock_printer.cc ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698