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

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

Issue 8387039: Move content_restriction.h and main_function_params.h to content/public/common, and put them in t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "base/memory/ref_counted_memory.h" 11 #include "base/memory/ref_counted_memory.h"
12 #include "base/shared_memory.h" 12 #include "base/shared_memory.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/printing/print_job_manager.h" 14 #include "chrome/browser/printing/print_job_manager.h"
15 #include "chrome/browser/printing/print_preview_tab_controller.h" 15 #include "chrome/browser/printing/print_preview_tab_controller.h"
16 #include "chrome/browser/printing/print_view_manager.h" 16 #include "chrome/browser/printing/print_view_manager.h"
17 #include "chrome/browser/printing/printer_query.h" 17 #include "chrome/browser/printing/printer_query.h"
18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
19 #include "chrome/browser/ui/webui/print_preview_handler.h" 19 #include "chrome/browser/ui/webui/print_preview_handler.h"
20 #include "chrome/browser/ui/webui/print_preview_ui.h" 20 #include "chrome/browser/ui/webui/print_preview_ui.h"
21 #include "chrome/common/print_messages.h" 21 #include "chrome/common/print_messages.h"
22 #include "content/browser/renderer_host/render_view_host.h" 22 #include "content/browser/renderer_host/render_view_host.h"
23 #include "content/browser/tab_contents/tab_contents.h" 23 #include "content/browser/tab_contents/tab_contents.h"
24 #include "content/common/content_restriction.h"
25 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "content/public/common/content_restriction.h"
26 #include "printing/page_size_margins.h" 26 #include "printing/page_size_margins.h"
27 #include "printing/print_job_constants.h" 27 #include "printing/print_job_constants.h"
28 28
29 namespace { 29 namespace {
30 30
31 void StopWorker(int document_cookie) { 31 void StopWorker(int document_cookie) {
32 if (document_cookie <= 0) 32 if (document_cookie <= 0)
33 return; 33 return;
34 34
35 printing::PrintJobManager* print_job_manager = 35 printing::PrintJobManager* print_job_manager =
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings, 238 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings,
239 OnInvalidPrinterSettings) 239 OnInvalidPrinterSettings)
240 IPC_MESSAGE_UNHANDLED(handled = false) 240 IPC_MESSAGE_UNHANDLED(handled = false)
241 IPC_END_MESSAGE_MAP() 241 IPC_END_MESSAGE_MAP()
242 return handled; 242 return handled;
243 } 243 }
244 244
245 void PrintPreviewMessageHandler::DidStartLoading() { 245 void PrintPreviewMessageHandler::DidStartLoading() {
246 if (tab_contents()->delegate() && 246 if (tab_contents()->delegate() &&
247 PrintPreviewTabController::IsPrintPreviewTab(tab_contents_wrapper())) { 247 PrintPreviewTabController::IsPrintPreviewTab(tab_contents_wrapper())) {
248 tab_contents()->SetContentRestrictions(CONTENT_RESTRICTION_PRINT); 248 tab_contents()->SetContentRestrictions(content::CONTENT_RESTRICTION_PRINT);
249 } 249 }
250 } 250 }
251 251
252 } // namespace printing 252 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/mac/relauncher.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698