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

Side by Side Diff: chrome/browser/printing/print_view_manager.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_view_manager.h" 5 #include "chrome/browser/printing/print_view_manager.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 27 matching lines...) Expand all
38 #include "grit/generated_resources.h" 38 #include "grit/generated_resources.h"
39 #include "printing/metafile.h" 39 #include "printing/metafile.h"
40 #include "printing/metafile_impl.h" 40 #include "printing/metafile_impl.h"
41 #include "printing/print_destination_interface.h" 41 #include "printing/print_destination_interface.h"
42 #include "printing/printed_document.h" 42 #include "printing/printed_document.h"
43 #include "ui/base/l10n/l10n_util.h" 43 #include "ui/base/l10n/l10n_util.h"
44 44
45 using base::TimeDelta; 45 using base::TimeDelta;
46 using content::BrowserThread; 46 using content::BrowserThread;
47 47
48 int printing::PrintViewManager::kUserDataKey; 48 DEFINE_WEB_CONTENTS_USER_DATA_KEY(printing::PrintViewManager)
49 49
50 namespace { 50 namespace {
51 51
52 // Keeps track of pending scripted print preview closures. 52 // Keeps track of pending scripted print preview closures.
53 // No locking, only access on the UI thread. 53 // No locking, only access on the UI thread.
54 typedef std::map<content::RenderProcessHost*, base::Closure> 54 typedef std::map<content::RenderProcessHost*, base::Closure>
55 ScriptedPrintPreviewClosureMap; 55 ScriptedPrintPreviewClosureMap;
56 static base::LazyInstance<ScriptedPrintPreviewClosureMap> 56 static base::LazyInstance<ScriptedPrintPreviewClosureMap>
57 g_scripted_print_preview_closure_map = LAZY_INSTANCE_INITIALIZER; 57 g_scripted_print_preview_closure_map = LAZY_INSTANCE_INITIALIZER;
58 58
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 scoped_refptr<printing::PrinterQuery> printer_query; 683 scoped_refptr<printing::PrinterQuery> printer_query;
684 print_job_manager->PopPrinterQuery(cookie, &printer_query); 684 print_job_manager->PopPrinterQuery(cookie, &printer_query);
685 if (!printer_query.get()) 685 if (!printer_query.get())
686 return; 686 return;
687 BrowserThread::PostTask( 687 BrowserThread::PostTask(
688 BrowserThread::IO, FROM_HERE, 688 BrowserThread::IO, FROM_HERE,
689 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 689 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
690 } 690 }
691 691
692 } // namespace printing 692 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698