Fix compiling with print messages.

This commit is contained in:
Cheng Zhao 2014-08-21 16:14:22 +08:00
parent 8dcb3726f9
commit 7de0f71a75
4 changed files with 20 additions and 8 deletions

View file

@ -167,7 +167,6 @@
'atom/browser/window_list.cc', 'atom/browser/window_list.cc',
'atom/browser/window_list.h', 'atom/browser/window_list.h',
'atom/browser/window_list_observer.h', 'atom/browser/window_list_observer.h',
'atom/common/api/api_messages.cc',
'atom/common/api/api_messages.h', 'atom/common/api/api_messages.h',
'atom/common/api/atom_api_clipboard.cc', 'atom/common/api/atom_api_clipboard.cc',
'atom/common/api/atom_api_crash_reporter.cc', 'atom/common/api/atom_api_crash_reporter.cc',
@ -181,6 +180,8 @@
'atom/common/api/atom_bindings.h', 'atom/common/api/atom_bindings.h',
'atom/common/api/object_life_monitor.cc', 'atom/common/api/object_life_monitor.cc',
'atom/common/api/object_life_monitor.h', 'atom/common/api/object_life_monitor.h',
'atom/common/common_message_generator.cc',
'atom/common/common_message_generator.h',
'atom/common/crash_reporter/crash_reporter.cc', 'atom/common/crash_reporter/crash_reporter.cc',
'atom/common/crash_reporter/crash_reporter.h', 'atom/common/crash_reporter/crash_reporter.h',
'atom/common/crash_reporter/crash_reporter_linux.cc', 'atom/common/crash_reporter/crash_reporter_linux.cc',

View file

@ -1,33 +1,34 @@
// Copyright (c) 2013 GitHub, Inc. All rights reserved. // Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Get basic type definitions. // Get basic type definitions.
#define IPC_MESSAGE_IMPL #define IPC_MESSAGE_IMPL
#include "atom/common/api/api_messages.h" #include "atom/common/common_message_generator.h"
// Generate constructors. // Generate constructors.
#include "ipc/struct_constructor_macros.h" #include "ipc/struct_constructor_macros.h"
#include "atom/common/api/api_messages.h" #include "atom/common/common_message_generator.h"
// Generate destructors. // Generate destructors.
#include "ipc/struct_destructor_macros.h" #include "ipc/struct_destructor_macros.h"
#include "atom/common/api/api_messages.h" #include "atom/common/common_message_generator.h"
// Generate param traits write methods. // Generate param traits write methods.
#include "ipc/param_traits_write_macros.h" #include "ipc/param_traits_write_macros.h"
namespace IPC { namespace IPC {
#include "atom/common/api/api_messages.h" #include "atom/common/common_message_generator.h"
} // namespace IPC } // namespace IPC
// Generate param traits read methods. // Generate param traits read methods.
#include "ipc/param_traits_read_macros.h" #include "ipc/param_traits_read_macros.h"
namespace IPC { namespace IPC {
#include "atom/common/api/api_messages.h" #include "atom/common/common_message_generator.h"
} // namespace IPC } // namespace IPC
// Generate param traits log methods. // Generate param traits log methods.
#include "ipc/param_traits_log_macros.h" #include "ipc/param_traits_log_macros.h"
namespace IPC { namespace IPC {
#include "atom/common/api/api_messages.h" #include "atom/common/common_message_generator.h"
} // namespace IPC } // namespace IPC

View file

@ -0,0 +1,8 @@
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// Multiply-included file, no traditional include guard.
#include "atom/common/api/api_messages.h"
#include "chrome/common/print_messages.h"

View file

@ -11,6 +11,7 @@
#include "atom/common/options_switches.h" #include "atom/common/options_switches.h"
#include "atom/renderer/api/atom_renderer_bindings.h" #include "atom/renderer/api/atom_renderer_bindings.h"
#include "atom/renderer/atom_render_view_observer.h" #include "atom/renderer/atom_render_view_observer.h"
#include "chrome/renderer/printing/print_web_view_helper.h"
#include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_frame_observer.h" #include "content/public/renderer/render_frame_observer.h"
#include "base/command_line.h" #include "base/command_line.h"
@ -105,6 +106,7 @@ void AtomRendererClient::RenderFrameCreated(
} }
void AtomRendererClient::RenderViewCreated(content::RenderView* render_view) { void AtomRendererClient::RenderViewCreated(content::RenderView* render_view) {
new printing::PrintWebViewHelper(render_view);
new AtomRenderViewObserver(render_view, this); new AtomRenderViewObserver(render_view, this);
} }