Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: chrome/renderer/external_host_bindings.h

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/external_extension.cc ('k') | chrome/renderer/external_host_bindings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_EXTERNAL_HOST_BINDINGS_H_ 5 #ifndef CHROME_RENDERER_EXTERNAL_HOST_BINDINGS_H_
6 #define CHROME_RENDERER_EXTERNAL_HOST_BINDINGS_H_ 6 #define CHROME_RENDERER_EXTERNAL_HOST_BINDINGS_H_
7 7
8 #include "chrome/renderer/dom_ui_bindings.h" 8 #include "chrome/renderer/dom_ui_bindings.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 10
(...skipping 11 matching lines...) Expand all
22 // The postMessage() function provided to Javascript. 22 // The postMessage() function provided to Javascript.
23 void postMessage(const CppArgumentList& args, CppVariant* result); 23 void postMessage(const CppArgumentList& args, CppVariant* result);
24 24
25 // Invokes the registered onmessage handler. 25 // Invokes the registered onmessage handler.
26 // Returns true on successful invocation. 26 // Returns true on successful invocation.
27 bool ForwardMessageFromExternalHost(const std::string& message, 27 bool ForwardMessageFromExternalHost(const std::string& message,
28 const std::string& origin, 28 const std::string& origin,
29 const std::string& target); 29 const std::string& target);
30 30
31 // Overridden to hold onto a pointer back to the web frame. 31 // Overridden to hold onto a pointer back to the web frame.
32 void BindToJavascript(WebFrame* frame, const std::wstring& classname) { 32 void BindToJavascript(WebKit::WebFrame* frame,
33 const std::wstring& classname) {
33 frame_ = frame; 34 frame_ = frame;
34 DOMBoundBrowserObject::BindToJavascript(frame, classname); 35 DOMBoundBrowserObject::BindToJavascript(frame, classname);
35 } 36 }
36 37
37 protected: 38 protected:
38 // Creates an uninitialized instance of a MessageEvent object. 39 // Creates an uninitialized instance of a MessageEvent object.
39 // This is equivalent to calling window.document.createEvent("MessageEvent") 40 // This is equivalent to calling window.document.createEvent("MessageEvent")
40 // in javascript. 41 // in javascript.
41 bool CreateMessageEvent(NPObject** message_event); 42 bool CreateMessageEvent(NPObject** message_event);
42 43
43 private: 44 private:
44 CppVariant on_message_handler_; 45 CppVariant on_message_handler_;
45 WebFrame* frame_; 46 WebKit::WebFrame* frame_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(ExternalHostBindings); 48 DISALLOW_COPY_AND_ASSIGN(ExternalHostBindings);
48 }; 49 };
49 50
50 #endif // CHROME_RENDERER_EXTERNAL_HOST_BINDINGS_H_ 51 #endif // CHROME_RENDERER_EXTERNAL_HOST_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/external_extension.cc ('k') | chrome/renderer/external_host_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698