OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/renderer/extension_helper.h" | 5 #include "extensions/renderer/extension_helper.h" |
6 | 6 |
7 #include "content/public/renderer/render_view.h" | 7 #include "content/public/renderer/render_view.h" |
8 #include "content/public/renderer/render_view_visitor.h" | 8 #include "content/public/renderer/render_view_visitor.h" |
9 #include "extensions/common/api/messaging/message.h" | 9 #include "extensions/common/api/messaging/message.h" |
10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 return handled; | 152 return handled; |
153 } | 153 } |
154 | 154 |
155 void ExtensionHelper::DidCreateDocumentElement(WebLocalFrame* frame) { | 155 void ExtensionHelper::DidCreateDocumentElement(WebLocalFrame* frame) { |
156 dispatcher_->DidCreateDocumentElement(frame); | 156 dispatcher_->DidCreateDocumentElement(frame); |
157 } | 157 } |
158 | 158 |
159 void ExtensionHelper::DraggableRegionsChanged(blink::WebFrame* frame) { | 159 void ExtensionHelper::DraggableRegionsChanged(blink::WebFrame* frame) { |
160 blink::WebVector<blink::WebDraggableRegion> webregions = | 160 blink::WebVector<blink::WebDraggableRegion> webregions = |
161 frame->document().draggableRegions(); | 161 frame->document().draggableRegions(); |
162 std::vector<DraggableRegion> regions; | 162 std::vector<native_app_window::DraggableRegion> regions; |
163 for (size_t i = 0; i < webregions.size(); ++i) { | 163 for (size_t i = 0; i < webregions.size(); ++i) { |
164 DraggableRegion region; | 164 native_app_window::DraggableRegion region; |
165 region.bounds = webregions[i].bounds; | 165 region.bounds = webregions[i].bounds; |
166 region.draggable = webregions[i].draggable; | 166 region.draggable = webregions[i].draggable; |
167 regions.push_back(region); | 167 regions.push_back(region); |
168 } | 168 } |
169 Send(new ExtensionHostMsg_UpdateDraggableRegions(routing_id(), regions)); | 169 Send(new ExtensionHostMsg_UpdateDraggableRegions(routing_id(), regions)); |
170 } | 170 } |
171 | 171 |
172 void ExtensionHelper::DidMatchCSS( | 172 void ExtensionHelper::DidMatchCSS( |
173 blink::WebLocalFrame* frame, | 173 blink::WebLocalFrame* frame, |
174 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 174 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); | 256 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); |
257 ScriptContext* script_context = | 257 ScriptContext* script_context = |
258 dispatcher_->script_context_set().GetByV8Context(v8_context); | 258 dispatcher_->script_context_set().GetByV8Context(v8_context); |
259 if (!script_context) | 259 if (!script_context) |
260 return; | 260 return; |
261 script_context->module_system()->CallModuleMethod("app.window", | 261 script_context->module_system()->CallModuleMethod("app.window", |
262 "onAppWindowClosed"); | 262 "onAppWindowClosed"); |
263 } | 263 } |
264 | 264 |
265 } // namespace extensions | 265 } // namespace extensions |
OLD | NEW |