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

Unified Diff: chrome/renderer/printing/print_web_view_helper.h

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/prerender/prerenderer_client.cc ('k') | chrome/renderer/printing/print_web_view_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/printing/print_web_view_helper.h
diff --git a/chrome/renderer/printing/print_web_view_helper.h b/chrome/renderer/printing/print_web_view_helper.h
index b603d9ab1a154bf868d40b41ff7a4bdf6bb2c2bd..70fb801d8944d479bb06324cf7dabb21630c4bc8 100644
--- a/chrome/renderer/printing/print_web_view_helper.h
+++ b/chrome/renderer/printing/print_web_view_helper.h
@@ -28,7 +28,7 @@ namespace base {
class DictionaryValue;
}
-namespace WebKit {
+namespace blink {
class WebFrame;
class WebView;
}
@@ -42,18 +42,18 @@ class PrepareFrameAndViewForPrint;
// Workaround to modal dialog issue on Linux. crbug.com/236147.
class FrameReference {
public:
- explicit FrameReference(const WebKit::WebFrame* frame);
+ explicit FrameReference(const blink::WebFrame* frame);
FrameReference();
~FrameReference();
- void Reset(const WebKit::WebFrame* frame);
+ void Reset(const blink::WebFrame* frame);
- WebKit::WebFrame* GetFrame();
- WebKit::WebView* view();
+ blink::WebFrame* GetFrame();
+ blink::WebView* view();
private:
- WebKit::WebView* view_;
- WebKit::WebString frame_name_;
+ blink::WebView* view_;
+ blink::WebString frame_name_;
};
// PrintWebViewHelper handles most of the printing grunt work for RenderView.
@@ -68,7 +68,7 @@ class PrintWebViewHelper
bool IsPrintingEnabled();
- void PrintNode(const WebKit::WebNode& node);
+ void PrintNode(const blink::WebNode& node);
private:
friend class PrintWebViewHelperTestBase;
@@ -112,7 +112,7 @@ class PrintWebViewHelper
// RenderViewObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void PrintPage(WebKit::WebFrame* frame, bool user_initiated) OVERRIDE;
+ virtual void PrintPage(blink::WebFrame* frame, bool user_initiated) OVERRIDE;
virtual void DidStartLoading() OVERRIDE;
virtual void DidStopLoading() OVERRIDE;
@@ -151,7 +151,7 @@ class PrintWebViewHelper
// option is disabled for initiator renderer plugin.
//
// In all other cases, we scale the source page to fit the printable area.
- WebKit::WebPrintScalingOption GetPrintScalingOption(
+ blink::WebPrintScalingOption GetPrintScalingOption(
bool source_is_html,
const base::DictionaryValue& job_settings,
const PrintMsg_Print_Params& params);
@@ -194,7 +194,7 @@ class PrintWebViewHelper
// Main printing code -------------------------------------------------------
- void Print(WebKit::WebFrame* frame, const WebKit::WebNode& node);
+ void Print(blink::WebFrame* frame, const blink::WebNode& node);
// Notification when printing is done - signal tear-down/free resources.
void DidFinishPrinting(PrintingResult result);
@@ -206,28 +206,28 @@ class PrintWebViewHelper
bool InitPrintSettings(bool fit_to_paper_size);
// Calculate number of pages in source document.
- bool CalculateNumberOfPages(WebKit::WebFrame* frame,
- const WebKit::WebNode& node,
+ bool CalculateNumberOfPages(blink::WebFrame* frame,
+ const blink::WebNode& node,
int* number_of_pages);
// Update the current print settings with new |passed_job_settings|.
// |passed_job_settings| dictionary contains print job details such as printer
// name, number of copies, page range, etc.
- bool UpdatePrintSettings(WebKit::WebFrame* frame,
- const WebKit::WebNode& node,
+ bool UpdatePrintSettings(blink::WebFrame* frame,
+ const blink::WebNode& node,
const base::DictionaryValue& passed_job_settings);
// Get final print settings from the user.
// Return false if the user cancels or on error.
- bool GetPrintSettingsFromUser(WebKit::WebFrame* frame,
- const WebKit::WebNode& node,
+ bool GetPrintSettingsFromUser(blink::WebFrame* frame,
+ const blink::WebNode& node,
int expected_pages_count);
// Page Printing / Rendering ------------------------------------------------
void OnFramePreparedForPrintPages();
void PrintPages();
- bool PrintPagesNative(WebKit::WebFrame* frame,
+ bool PrintPagesNative(blink::WebFrame* frame,
int page_count,
const gfx::Size& canvas_size);
void FinishFramePrinting();
@@ -236,23 +236,23 @@ class PrintWebViewHelper
#if defined(OS_LINUX) || defined(OS_ANDROID)
void PrintPageInternal(const PrintMsg_PrintPage_Params& params,
const gfx::Size& canvas_size,
- WebKit::WebFrame* frame,
+ blink::WebFrame* frame,
Metafile* metafile);
#else
void PrintPageInternal(const PrintMsg_PrintPage_Params& params,
const gfx::Size& canvas_size,
- WebKit::WebFrame* frame);
+ blink::WebFrame* frame);
#endif
// Render the frame for printing.
- bool RenderPagesForPrint(WebKit::WebFrame* frame,
- const WebKit::WebNode& node);
+ bool RenderPagesForPrint(blink::WebFrame* frame,
+ const blink::WebNode& node);
// Platform specific helper function for rendering page(s) to |metafile|.
#if defined(OS_WIN)
void RenderPage(const PrintMsg_Print_Params& params,
int page_number,
- WebKit::WebFrame* frame,
+ blink::WebFrame* frame,
bool is_preview,
Metafile* metafile,
double* scale_factor,
@@ -261,7 +261,7 @@ class PrintWebViewHelper
#elif defined(OS_MACOSX)
void RenderPage(const PrintMsg_Print_Params& params,
int page_number,
- WebKit::WebFrame* frame,
+ blink::WebFrame* frame,
bool is_preview,
Metafile* metafile,
gfx::Size* page_size,
@@ -272,12 +272,12 @@ class PrintWebViewHelper
// |page_number| is zero-based.
// When method is called, canvas should be setup to draw to |canvas_area|
// with |scale_factor|.
- static float RenderPageContent(WebKit::WebFrame* frame,
+ static float RenderPageContent(blink::WebFrame* frame,
int page_number,
const gfx::Rect& canvas_area,
const gfx::Rect& content_area,
double scale_factor,
- WebKit::WebCanvas* canvas);
+ blink::WebCanvas* canvas);
// Helper methods -----------------------------------------------------------
@@ -286,7 +286,7 @@ class PrintWebViewHelper
// Helper method to get page layout in points and fit to page if needed.
static void ComputePageLayoutInPointsForCss(
- WebKit::WebFrame* frame,
+ blink::WebFrame* frame,
int page_index,
const PrintMsg_Print_Params& default_params,
bool ignore_css_margins,
@@ -296,7 +296,7 @@ class PrintWebViewHelper
// Given the |device| and |canvas| to draw on, prints the appropriate headers
// and footers using strings from |header_footer_info| on to the canvas.
static void PrintHeaderAndFooter(
- WebKit::WebCanvas* canvas,
+ blink::WebCanvas* canvas,
int page_number,
int total_pages,
float webkit_scale_factor,
@@ -304,18 +304,18 @@ class PrintWebViewHelper
const base::DictionaryValue& header_footer_info,
const PrintMsg_Print_Params& params);
- bool GetPrintFrame(WebKit::WebFrame** frame);
+ bool GetPrintFrame(blink::WebFrame** frame);
// Script Initiated Printing ------------------------------------------------
// Return true if script initiated printing is currently
// allowed. |user_initiated| should be true when a user event triggered the
// script, most likely by pressing a print button on the page.
- bool IsScriptInitiatedPrintAllowed(WebKit::WebFrame* frame,
+ bool IsScriptInitiatedPrintAllowed(blink::WebFrame* frame,
bool user_initiated);
// Returns true if script initiated printing occurs too often.
- bool IsScriptInitiatedPrintTooFrequent(WebKit::WebFrame* frame);
+ bool IsScriptInitiatedPrintTooFrequent(blink::WebFrame* frame);
// Reset the counter for script initiated printing.
// Scripted printing will be allowed to continue.
@@ -377,8 +377,8 @@ class PrintWebViewHelper
// Initializes the print preview context. Need to be called to set
// the |web_frame| / |web_node| to generate the print preview for.
- void InitWithFrame(WebKit::WebFrame* web_frame);
- void InitWithNode(const WebKit::WebNode& web_node);
+ void InitWithFrame(blink::WebFrame* web_frame);
+ void InitWithNode(const blink::WebNode& web_node);
// Does bookkeeping at the beginning of print preview.
void OnPrintPreview();
@@ -418,16 +418,16 @@ class PrintWebViewHelper
// Getters
// Original frame for which preview was requested.
- WebKit::WebFrame* source_frame();
+ blink::WebFrame* source_frame();
// Original node for which preview was requested.
- const WebKit::WebNode& source_node() const;
+ const blink::WebNode& source_node() const;
// Frame to be use to render preview. May be the same as source_frame(), or
// generated from it, e.g. copy of selected block.
- WebKit::WebFrame* prepared_frame();
+ blink::WebFrame* prepared_frame();
// Node to be use to render preview. May be the same as source_node(), or
// generated from it, e.g. copy of selected block.
- const WebKit::WebNode& prepared_node() const;
+ const blink::WebNode& prepared_node() const;
int total_page_count() const;
bool generate_draft_pages() const;
@@ -448,7 +448,7 @@ class PrintWebViewHelper
// Specifies what to render for print preview.
FrameReference source_frame_;
- WebKit::WebNode source_node_;
+ blink::WebNode source_node_;
scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
scoped_ptr<PreviewMetafile> metafile_;
« no previous file with comments | « chrome/renderer/prerender/prerenderer_client.cc ('k') | chrome/renderer/printing/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698