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

Side by Side Diff: chrome/browser/printing/print_preview_message_handler.cc

Issue 10993064: Make using WebContentsUserData simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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
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 #include "chrome/browser/printing/print_preview_message_handler.h" 5 #include "chrome/browser/printing/print_preview_message_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "content/public/browser/render_view_host.h" 22 #include "content/public/browser/render_view_host.h"
23 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
24 #include "content/public/browser/web_ui.h" 24 #include "content/public/browser/web_ui.h"
25 #include "printing/page_size_margins.h" 25 #include "printing/page_size_margins.h"
26 #include "printing/print_job_constants.h" 26 #include "printing/print_job_constants.h"
27 27
28 using content::BrowserThread; 28 using content::BrowserThread;
29 using content::WebContents; 29 using content::WebContents;
30 30
31 int printing::PrintPreviewMessageHandler::kUserDataKey; 31 DEFINE_WEB_CONTENTS_USER_DATA_KEY(printing::PrintPreviewMessageHandler)
32 32
33 namespace { 33 namespace {
34 34
35 void StopWorker(int document_cookie) { 35 void StopWorker(int document_cookie) {
36 if (document_cookie <= 0) 36 if (document_cookie <= 0)
37 return; 37 return;
38 38
39 printing::PrintJobManager* print_job_manager = 39 printing::PrintJobManager* print_job_manager =
40 g_browser_process->print_job_manager(); 40 g_browser_process->print_job_manager();
41 scoped_refptr<printing::PrinterQuery> printer_query; 41 scoped_refptr<printing::PrinterQuery> printer_query;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings, 242 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings,
243 OnInvalidPrinterSettings) 243 OnInvalidPrinterSettings)
244 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewScalingDisabled, 244 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewScalingDisabled,
245 OnPrintPreviewScalingDisabled) 245 OnPrintPreviewScalingDisabled)
246 IPC_MESSAGE_UNHANDLED(handled = false) 246 IPC_MESSAGE_UNHANDLED(handled = false)
247 IPC_END_MESSAGE_MAP() 247 IPC_END_MESSAGE_MAP()
248 return handled; 248 return handled;
249 } 249 }
250 250
251 } // namespace printing 251 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698