| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_WEB_UI_BINDINGS_H_ | 5 #ifndef CONTENT_RENDERER_WEB_UI_BINDINGS_H_ |
| 6 #define CONTENT_RENDERER_WEB_UI_BINDINGS_H_ | 6 #define CONTENT_RENDERER_WEB_UI_BINDINGS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/common/content_export.h" |
| 9 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| 10 #include "webkit/glue/cpp_bound_class.h" | 11 #include "webkit/glue/cpp_bound_class.h" |
| 11 | 12 |
| 12 // A DOMBoundBrowserObject is a backing for some object bound to the window | 13 // A DOMBoundBrowserObject is a backing for some object bound to the window |
| 13 // in JS that knows how to dispatch messages to an associated c++ object living | 14 // in JS that knows how to dispatch messages to an associated c++ object living |
| 14 // in the browser process. | 15 // in the browser process. |
| 15 class DOMBoundBrowserObject : public CppBoundClass { | 16 class DOMBoundBrowserObject : public CppBoundClass { |
| 16 public: | 17 public: |
| 17 DOMBoundBrowserObject(); | 18 CONTENT_EXPORT DOMBoundBrowserObject(); |
| 18 virtual ~DOMBoundBrowserObject(); | 19 CONTENT_EXPORT virtual ~DOMBoundBrowserObject(); |
| 19 | 20 |
| 20 // Set the message channel back to the browser. | 21 // Set the message channel back to the browser. |
| 21 void set_message_sender(IPC::Message::Sender* sender) { | 22 void set_message_sender(IPC::Message::Sender* sender) { |
| 22 sender_ = sender; | 23 sender_ = sender; |
| 23 } | 24 } |
| 24 | 25 |
| 25 // Set the routing id for messages back to the browser. | 26 // Set the routing id for messages back to the browser. |
| 26 void set_routing_id(int routing_id) { | 27 void set_routing_id(int routing_id) { |
| 27 routing_id_ = routing_id; | 28 routing_id_ = routing_id; |
| 28 } | 29 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 59 WebUIBindings(); | 60 WebUIBindings(); |
| 60 virtual ~WebUIBindings(); | 61 virtual ~WebUIBindings(); |
| 61 | 62 |
| 62 // The send() function provided to Javascript. | 63 // The send() function provided to Javascript. |
| 63 void send(const CppArgumentList& args, CppVariant* result); | 64 void send(const CppArgumentList& args, CppVariant* result); |
| 64 private: | 65 private: |
| 65 DISALLOW_COPY_AND_ASSIGN(WebUIBindings); | 66 DISALLOW_COPY_AND_ASSIGN(WebUIBindings); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 #endif // CONTENT_RENDERER_WEB_UI_BINDINGS_H_ | 69 #endif // CONTENT_RENDERER_WEB_UI_BINDINGS_H_ |
| OLD | NEW |