#include "atom/browser/atom_resource_dispatcher_host_delegate.h"
#include "atom/browser/native_window.h"
#include "atom/browser/window_list.h"
+#include "chrome/browser/printing/printing_message_filter.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
AtomBrowserClient::~AtomBrowserClient() {
}
+void AtomBrowserClient::RenderProcessWillLaunch(
+ content::RenderProcessHost* host) {
+ host->AddFilter(new PrintingMessageFilter(host->GetID()));
+}
+
void AtomBrowserClient::ResourceDispatcherHostCreated() {
resource_dispatcher_delegate_.reset(new AtomResourceDispatcherHostDelegate);
content::ResourceDispatcherHost::Get()->SetDelegate(
protected:
// content::ContentBrowserClient:
+ virtual void RenderProcessWillLaunch(
+ content::RenderProcessHost* host) OVERRIDE;
virtual void ResourceDispatcherHostCreated() OVERRIDE;
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
} // namespace
-PrintingMessageFilter::PrintingMessageFilter(int render_process_id,
- Profile* profile)
+PrintingMessageFilter::PrintingMessageFilter(int render_process_id)
: BrowserMessageFilter(PrintMsgStart),
- // profile_io_data_(ProfileIOData::FromResourceContext(
- // profile->GetResourceContext())),
render_process_id_(render_process_id),
queue_(g_browser_process->print_job_manager()->queue()) {
DCHECK(queue_);
#endif
struct PrintHostMsg_ScriptedPrint_Params;
-class Profile;
-class ProfileIOData;
namespace base {
class DictionaryValue;
// renderer process on the IPC thread.
class PrintingMessageFilter : public content::BrowserMessageFilter {
public:
- PrintingMessageFilter(int render_process_id, Profile* profile);
+ explicit PrintingMessageFilter(int render_process_id);
// content::BrowserMessageFilter methods.
virtual void OverrideThreadForMessage(