| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/renderer/extensions/extension_custom_bindings.h" | 5 #include "chrome/renderer/extensions/extension_custom_bindings.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/common/chrome_view_type.h" | 10 #include "chrome/common/chrome_view_type.h" |
| 11 #include "chrome/common/extensions/extension_action.h" | 11 #include "chrome/common/extensions/extension_action.h" |
| 12 #include "chrome/common/extensions/extension_messages.h" | 12 #include "chrome/common/extensions/extension_messages.h" |
| 13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/renderer/extensions/extension_dispatcher.h" | 14 #include "chrome/renderer/extensions/extension_dispatcher.h" |
| 15 #include "chrome/renderer/extensions/extension_helper.h" | 15 #include "chrome/renderer/extensions/extension_helper.h" |
| 16 #include "content/public/renderer/render_view.h" | 16 #include "content/public/renderer/render_view.h" |
| 17 #include "content/public/renderer/render_view_visitor.h" | 17 #include "content/public/renderer/render_view_visitor.h" |
| 18 #include "grit/renderer_resources.h" | 18 #include "grit/renderer_resources.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 22 #include "v8/include/v8.h" | 22 #include "v8/include/v8.h" |
| 23 #include "webkit/glue/webkit_glue.h" | 23 #include "webkit/glue/webkit_glue.h" |
| 24 | 24 |
| 25 using WebKit::WebFrame; | |
| 26 using WebKit::WebView; | |
| 27 | |
| 28 namespace extensions { | 25 namespace extensions { |
| 29 | 26 |
| 30 namespace { | 27 namespace { |
| 31 | 28 |
| 32 // A RenderViewVisitor class that iterates through the set of available | 29 // A RenderViewVisitor class that iterates through the set of available |
| 33 // views, looking for a view of the given type, in the given browser window | 30 // views, looking for a view of the given type, in the given browser window |
| 34 // and within the given extension. | 31 // and within the given extension. |
| 35 // Used to accumulate the list of views associated with an extension. | 32 // Used to accumulate the list of views associated with an extension. |
| 36 class ExtensionViewAccumulator : public content::RenderViewVisitor { | 33 class ExtensionViewAccumulator : public content::RenderViewVisitor { |
| 37 public: | 34 public: |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension( | 187 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension( |
| 191 renderview->GetRoutingID(), | 188 renderview->GetRoutingID(), |
| 192 source_id, | 189 source_id, |
| 193 target_id, | 190 target_id, |
| 194 channel_name, | 191 channel_name, |
| 195 &port_id)); | 192 &port_id)); |
| 196 return v8::Integer::New(port_id); | 193 return v8::Integer::New(port_id); |
| 197 } | 194 } |
| 198 | 195 |
| 199 } // namespace extensions | 196 } // namespace extensions |
| OLD | NEW |