OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 177 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
178 #include "third_party/WebKit/public/web/WebDocument.h" | 178 #include "third_party/WebKit/public/web/WebDocument.h" |
179 #include "third_party/WebKit/public/web/WebFindOptions.h" | 179 #include "third_party/WebKit/public/web/WebFindOptions.h" |
180 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" | 180 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
181 #include "third_party/WebKit/public/web/WebFrameSerializer.h" | 181 #include "third_party/WebKit/public/web/WebFrameSerializer.h" |
182 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h" | 182 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h" |
183 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 183 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
184 #include "third_party/WebKit/public/web/WebKit.h" | 184 #include "third_party/WebKit/public/web/WebKit.h" |
185 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 185 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
186 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 186 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
187 #include "third_party/WebKit/public/web/WebMojoBindings.h" | |
187 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 188 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
188 #include "third_party/WebKit/public/web/WebPlugin.h" | 189 #include "third_party/WebKit/public/web/WebPlugin.h" |
189 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 190 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
190 #include "third_party/WebKit/public/web/WebPluginDocument.h" | 191 #include "third_party/WebKit/public/web/WebPluginDocument.h" |
191 #include "third_party/WebKit/public/web/WebPluginParams.h" | 192 #include "third_party/WebKit/public/web/WebPluginParams.h" |
192 #include "third_party/WebKit/public/web/WebRange.h" | 193 #include "third_party/WebKit/public/web/WebRange.h" |
193 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 194 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
194 #include "third_party/WebKit/public/web/WebScriptSource.h" | 195 #include "third_party/WebKit/public/web/WebScriptSource.h" |
195 #include "third_party/WebKit/public/web/WebSearchableFormData.h" | 196 #include "third_party/WebKit/public/web/WebSearchableFormData.h" |
196 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 197 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
(...skipping 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2544 } | 2545 } |
2545 | 2546 |
2546 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( | 2547 void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable( |
2547 v8::Isolate* isolate, | 2548 v8::Isolate* isolate, |
2548 v8::Local<v8::Context> context) { | 2549 v8::Local<v8::Context> context) { |
2549 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); | 2550 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(context); |
2550 if (registry->available_modules().count(mojo::edk::js::Core::kModuleName)) | 2551 if (registry->available_modules().count(mojo::edk::js::Core::kModuleName)) |
2551 return; | 2552 return; |
2552 | 2553 |
2553 v8::HandleScope handle_scope(isolate); | 2554 v8::HandleScope handle_scope(isolate); |
2554 registry->AddBuiltinModule(isolate, mojo::edk::js::Core::kModuleName, | 2555 registry->AddBuiltinModule( |
Ken Rockot(use gerrit already)
2016/10/10 17:11:25
I don't think this code should change yet. We shou
alokp
2016/10/18 00:11:47
Agreed. I have reverted the changes in this file f
| |
2555 mojo::edk::js::Core::GetModule(isolate)); | 2556 isolate, mojo::edk::js::Core::kModuleName, |
2557 blink::WebMojoBindings::createCore(isolate, context)); | |
2556 registry->AddBuiltinModule(isolate, mojo::edk::js::Support::kModuleName, | 2558 registry->AddBuiltinModule(isolate, mojo::edk::js::Support::kModuleName, |
2557 mojo::edk::js::Support::GetModule(isolate)); | 2559 mojo::edk::js::Support::GetModule(isolate)); |
2558 registry->AddBuiltinModule( | 2560 registry->AddBuiltinModule( |
2559 isolate, InterfaceProviderJsWrapper::kPerFrameModuleName, | 2561 isolate, InterfaceProviderJsWrapper::kPerFrameModuleName, |
2560 InterfaceProviderJsWrapper::Create( | 2562 blink::WebMojoBindings::createInterfaceProvider( |
2561 isolate, context, remote_interfaces_.get()) | 2563 isolate, context, base::MakeUnique<BlinkInterfaceProviderImpl>( |
2562 .ToV8()); | 2564 remote_interfaces_->GetWeakPtr()))); |
2563 registry->AddBuiltinModule( | 2565 registry->AddBuiltinModule( |
2564 isolate, InterfaceProviderJsWrapper::kPerProcessModuleName, | 2566 isolate, InterfaceProviderJsWrapper::kPerProcessModuleName, |
2565 InterfaceProviderJsWrapper::Create( | 2567 blink::WebMojoBindings::createInterfaceProvider( |
2566 isolate, context, RenderThread::Get()->GetRemoteInterfaces()) | 2568 isolate, context, |
2567 .ToV8()); | 2569 base::MakeUnique<BlinkInterfaceProviderImpl>( |
2570 RenderThread::Get()->GetRemoteInterfaces()->GetWeakPtr()))); | |
2568 } | 2571 } |
2569 | 2572 |
2570 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, | 2573 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, |
2571 const std::string& message) { | 2574 const std::string& message) { |
2572 blink::WebConsoleMessage::Level target_level = | 2575 blink::WebConsoleMessage::Level target_level = |
2573 blink::WebConsoleMessage::LevelLog; | 2576 blink::WebConsoleMessage::LevelLog; |
2574 switch (level) { | 2577 switch (level) { |
2575 case CONSOLE_MESSAGE_LEVEL_DEBUG: | 2578 case CONSOLE_MESSAGE_LEVEL_DEBUG: |
2576 target_level = blink::WebConsoleMessage::LevelDebug; | 2579 target_level = blink::WebConsoleMessage::LevelDebug; |
2577 break; | 2580 break; |
(...skipping 3915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6493 // event target. Potentially a Pepper plugin will receive the event. | 6496 // event target. Potentially a Pepper plugin will receive the event. |
6494 // In order to tell whether a plugin gets the last mouse event and which it | 6497 // In order to tell whether a plugin gets the last mouse event and which it |
6495 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6498 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6496 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6499 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6497 // |pepper_last_mouse_event_target_|. | 6500 // |pepper_last_mouse_event_target_|. |
6498 pepper_last_mouse_event_target_ = nullptr; | 6501 pepper_last_mouse_event_target_ = nullptr; |
6499 #endif | 6502 #endif |
6500 } | 6503 } |
6501 | 6504 |
6502 } // namespace content | 6505 } // namespace content |
OLD | NEW |