[Printing] Stop using GetUserAgent from non-browser process
https://chromium-review.googlesource.com/c/chromium/src/+/1353052
This commit is contained in:
parent
0e39ec688a
commit
52ef6d9ae4
3 changed files with 9 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/atom_browser_client.h"
|
||||
#include "atom/browser/atom_browser_context.h"
|
||||
#include "atom/browser/native_window.h"
|
||||
#include "atom/browser/ui/file_dialog.h"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -61,6 +61,7 @@ class RendererClientBase : public content::ContentRendererClient {
|
|||
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems)
|
||||
override;
|
||||
bool IsKeySystemsUpdateNeeded() override;
|
||||
void DidSetUserAgent(const std::string& user_agent) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<PreferencesManager> preferences_manager_;
|
||||
|
|
Loading…
Reference in a new issue