| 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 CHROME_RENDERER_WEB_UI_BINDINGS_H_ | 5 #ifndef CHROME_RENDERER_WEB_UI_BINDINGS_H_ |
| 6 #define CHROME_RENDERER_WEB_UI_BINDINGS_H_ | 6 #define CHROME_RENDERER_WEB_UI_BINDINGS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
| 10 #include "webkit/glue/cpp_bound_class.h" | 10 #include "webkit/glue/cpp_bound_class.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 PropertyList properties_; | 45 PropertyList properties_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(DOMBoundBrowserObject); | 47 DISALLOW_COPY_AND_ASSIGN(DOMBoundBrowserObject); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // WebUIBindings is the class backing the "chrome" object accessible | 50 // WebUIBindings is the class backing the "chrome" object accessible |
| 51 // from Javascript from privileged pages. | 51 // from Javascript from privileged pages. |
| 52 // | 52 // |
| 53 // We expose one function, for sending a message to the browser: | 53 // We expose one function, for sending a message to the browser: |
| 54 // send(String name, Object argument); | 54 // send(String name, Object argument); |
| 55 // It's plumbed through to the OnDOMUIMessage callback on RenderViewHost | 55 // It's plumbed through to the OnWebUIMessage callback on RenderViewHost |
| 56 // delegate. | 56 // delegate. |
| 57 class WebUIBindings : public DOMBoundBrowserObject { | 57 class WebUIBindings : public DOMBoundBrowserObject { |
| 58 public: | 58 public: |
| 59 WebUIBindings(); | 59 WebUIBindings(); |
| 60 virtual ~WebUIBindings(); | 60 virtual ~WebUIBindings(); |
| 61 | 61 |
| 62 // The send() function provided to Javascript. | 62 // The send() function provided to Javascript. |
| 63 void send(const CppArgumentList& args, CppVariant* result); | 63 void send(const CppArgumentList& args, CppVariant* result); |
| 64 private: | 64 private: |
| 65 DISALLOW_COPY_AND_ASSIGN(WebUIBindings); | 65 DISALLOW_COPY_AND_ASSIGN(WebUIBindings); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 #endif // CHROME_RENDERER_WEB_UI_BINDINGS_H_ | 68 #endif // CHROME_RENDERER_WEB_UI_BINDINGS_H_ |
| OLD | NEW |