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

Unified Diff: android_webview/renderer/print_web_view_helper.cc

Issue 805903005: Move WeakPtrFactory members to the end in some android code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/compositor/tab_content_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/renderer/print_web_view_helper.cc
diff --git a/android_webview/renderer/print_web_view_helper.cc b/android_webview/renderer/print_web_view_helper.cc
index 6a06fc4a81162e922bdfb40f78521772c410a95c..d334764a653a5c84327c1246919d5b3c37c8bdec 100644
--- a/android_webview/renderer/print_web_view_helper.cc
+++ b/android_webview/renderer/print_web_view_helper.cc
@@ -550,8 +550,6 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
void RestoreSize();
void CopySelection(const WebPreferences& preferences);
- base::WeakPtrFactory<PrepareFrameAndViewForPrint> weak_ptr_factory_;
-
FrameReference frame_;
blink::WebNode node_to_print_;
bool owns_web_view_;
@@ -564,6 +562,8 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
bool should_print_selection_only_;
bool is_printing_started_;
+ base::WeakPtrFactory<PrepareFrameAndViewForPrint> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PrepareFrameAndViewForPrint);
};
@@ -572,14 +572,14 @@ PrepareFrameAndViewForPrint::PrepareFrameAndViewForPrint(
blink::WebLocalFrame* frame,
const blink::WebNode& node,
bool ignore_css_margins)
- : weak_ptr_factory_(this),
- frame_(frame),
+ : frame_(frame),
node_to_print_(node),
owns_web_view_(false),
expected_pages_count_(0),
should_print_backgrounds_(params.should_print_backgrounds),
should_print_selection_only_(params.selection_only),
- is_printing_started_(false) {
+ is_printing_started_(false),
+ weak_ptr_factory_(this) {
PrintMsg_Print_Params print_params = params;
if (!should_print_selection_only_ ||
!PrintingNodeOrPdfFrame(frame, node_to_print_)) {
« no previous file with comments | « no previous file | chrome/browser/android/compositor/tab_content_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698