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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1397333003: PDF Printing: embed browser user agent string in PDF metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-11-05 (Thursday) 17:34:22 EST Created 5 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
« no previous file with comments | « no previous file | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 #if defined(ENABLE_IPC_FUZZER) 119 #if defined(ENABLE_IPC_FUZZER)
120 #include "chrome/common/external_ipc_dumper.h" 120 #include "chrome/common/external_ipc_dumper.h"
121 #endif 121 #endif
122 122
123 #if defined(ENABLE_PLUGINS) 123 #if defined(ENABLE_PLUGINS)
124 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" 124 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
125 #endif 125 #endif
126 126
127 #if defined(ENABLE_PRINTING) 127 #if defined(ENABLE_PRINTING)
128 #include "chrome/common/chrome_content_client.h"
128 #include "chrome/renderer/printing/chrome_print_web_view_helper_delegate.h" 129 #include "chrome/renderer/printing/chrome_print_web_view_helper_delegate.h"
129 #include "components/printing/renderer/print_web_view_helper.h" 130 #include "components/printing/renderer/print_web_view_helper.h"
131 #include "printing/print_settings.h"
130 #endif 132 #endif
131 133
132 #if defined(ENABLE_PRINT_PREVIEW) 134 #if defined(ENABLE_PRINT_PREVIEW)
133 #include "chrome/renderer/pepper/chrome_pdf_print_client.h" 135 #include "chrome/renderer/pepper/chrome_pdf_print_client.h"
134 #endif 136 #endif
135 137
136 #if defined(ENABLE_SPELLCHECK) 138 #if defined(ENABLE_SPELLCHECK)
137 #include "chrome/renderer/spellchecker/spellcheck.h" 139 #include "chrome/renderer/spellchecker/spellcheck.h"
138 #include "chrome/renderer/spellchecker/spellcheck_provider.h" 140 #include "chrome/renderer/spellchecker/spellcheck_provider.h"
139 #endif 141 #endif
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 extensions::ExtensionsRendererClient::Set( 350 extensions::ExtensionsRendererClient::Set(
349 ChromeExtensionsRendererClient::GetInstance()); 351 ChromeExtensionsRendererClient::GetInstance());
350 #endif 352 #endif
351 #if defined(ENABLE_PLUGINS) 353 #if defined(ENABLE_PLUGINS)
352 for (size_t i = 0; i < arraysize(kPredefinedAllowedCameraDeviceOrigins); ++i) 354 for (size_t i = 0; i < arraysize(kPredefinedAllowedCameraDeviceOrigins); ++i)
353 allowed_camera_device_origins_.insert( 355 allowed_camera_device_origins_.insert(
354 kPredefinedAllowedCameraDeviceOrigins[i]); 356 kPredefinedAllowedCameraDeviceOrigins[i]);
355 for (size_t i = 0; i < arraysize(kPredefinedAllowedCompositorOrigins); ++i) 357 for (size_t i = 0; i < arraysize(kPredefinedAllowedCompositorOrigins); ++i)
356 allowed_compositor_origins_.insert(kPredefinedAllowedCompositorOrigins[i]); 358 allowed_compositor_origins_.insert(kPredefinedAllowedCompositorOrigins[i]);
357 #endif 359 #endif
360 #if defined(ENABLE_PRINTING)
361 printing::SetAgent(GetUserAgent());
362 #endif
358 } 363 }
359 364
360 ChromeContentRendererClient::~ChromeContentRendererClient() { 365 ChromeContentRendererClient::~ChromeContentRendererClient() {
361 } 366 }
362 367
363 void ChromeContentRendererClient::RenderThreadStarted() { 368 void ChromeContentRendererClient::RenderThreadStarted() {
364 RenderThread* thread = RenderThread::Get(); 369 RenderThread* thread = RenderThread::Get();
365 370
366 chrome_observer_.reset(new ChromeRenderProcessObserver()); 371 chrome_observer_.reset(new ChromeRenderProcessObserver());
367 web_cache_observer_.reset(new web_cache::WebCacheRenderProcessObserver()); 372 web_cache_observer_.reset(new web_cache::WebCacheRenderProcessObserver());
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 // chrome.system.network.getNetworkInterfaces provides the same 1470 // chrome.system.network.getNetworkInterfaces provides the same
1466 // information. Also, the enforcement of sending and binding UDP is already done 1471 // information. Also, the enforcement of sending and binding UDP is already done
1467 // by chrome extension permission model. 1472 // by chrome extension permission model.
1468 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { 1473 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() {
1469 #if defined(ENABLE_EXTENSIONS) 1474 #if defined(ENABLE_EXTENSIONS)
1470 return !IsStandaloneExtensionProcess(); 1475 return !IsStandaloneExtensionProcess();
1471 #else 1476 #else
1472 return true; 1477 return true;
1473 #endif 1478 #endif
1474 } 1479 }
OLDNEW
« no previous file with comments | « no previous file | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698