[Printing] Stop using GetUserAgent from non-browser process

1353052
This commit is contained in:
deepak1556 2019-01-22 12:54:36 +05:30
parent 0e39ec688a
commit 52ef6d9ae4
3 changed files with 9 additions and 0 deletions

View file

@ -58,6 +58,7 @@
#if BUILDFLAG(ENABLE_PRINTING)
#include "atom/renderer/printing/print_render_frame_helper_delegate.h"
#include "components/printing/renderer/print_render_frame_helper.h"
#include "printing/print_settings.h"
#endif // BUILDFLAG(ENABLE_PRINTING)
namespace atom {
@ -288,6 +289,12 @@ bool RendererClientBase::IsKeySystemsUpdateNeeded() {
#endif
}
void RendererClientBase::DidSetUserAgent(const std::string& user_agent) {
#if BUILDFLAG(ENABLE_PRINTING)
printing::SetAgent(user_agent);
#endif
}
v8::Local<v8::Context> RendererClientBase::GetContext(
blink::WebLocalFrame* frame,
v8::Isolate* isolate) const {