Fix compiling with print messages.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 21 Aug 2014 08:14:22 +0000 (16:14 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 21 Aug 2014 08:14:22 +0000 (16:14 +0800)
atom.gyp
atom/common/common_message_generator.cc [moved from atom/common/api/api_messages.cc with 64% similarity]
atom/common/common_message_generator.h [new file with mode: 0644]
atom/renderer/atom_renderer_client.cc

index eaef148..9d11582 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
       'atom/browser/window_list.cc',
       'atom/browser/window_list.h',
       'atom/browser/window_list_observer.h',
-      'atom/common/api/api_messages.cc',
       'atom/common/api/api_messages.h',
       'atom/common/api/atom_api_clipboard.cc',
       'atom/common/api/atom_api_crash_reporter.cc',
       'atom/common/api/atom_bindings.h',
       'atom/common/api/object_life_monitor.cc',
       '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.h',
       'atom/common/crash_reporter/crash_reporter_linux.cc',
similarity index 64%
rename from atom/common/api/api_messages.cc
rename to atom/common/common_message_generator.cc
index e87a59a..815bd2c 100644 (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
 // found in the LICENSE file.
 
 // Get basic type definitions.
 #define IPC_MESSAGE_IMPL
-#include "atom/common/api/api_messages.h"
+#include "atom/common/common_message_generator.h"
 
 // Generate constructors.
 #include "ipc/struct_constructor_macros.h"
-#include "atom/common/api/api_messages.h"
+#include "atom/common/common_message_generator.h"
 
 // Generate destructors.
 #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.
 #include "ipc/param_traits_write_macros.h"
 namespace IPC {
-#include "atom/common/api/api_messages.h"
+#include "atom/common/common_message_generator.h"
 }  // namespace IPC
 
 // Generate param traits read methods.
 #include "ipc/param_traits_read_macros.h"
 namespace IPC {
-#include "atom/common/api/api_messages.h"
+#include "atom/common/common_message_generator.h"
 }  // namespace IPC
 
 // Generate param traits log methods.
 #include "ipc/param_traits_log_macros.h"
 namespace IPC {
-#include "atom/common/api/api_messages.h"
+#include "atom/common/common_message_generator.h"
 }  // namespace IPC
+
diff --git a/atom/common/common_message_generator.h b/atom/common/common_message_generator.h
new file mode 100644 (file)
index 0000000..b6e8240
--- /dev/null
@@ -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"
index 7fbc918..bd9139a 100644 (file)
@@ -11,6 +11,7 @@
 #include "atom/common/options_switches.h"
 #include "atom/renderer/api/atom_renderer_bindings.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_observer.h"
 #include "base/command_line.h"
@@ -105,6 +106,7 @@ void AtomRendererClient::RenderFrameCreated(
 }
 
 void AtomRendererClient::RenderViewCreated(content::RenderView* render_view) {
+  new printing::PrintWebViewHelper(render_view);
   new AtomRenderViewObserver(render_view, this);
 }