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 "content/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
132 #include "ui/events/keycodes/keyboard_codes_posix.h" | 132 #include "ui/events/keycodes/keyboard_codes_posix.h" |
133 #endif | 133 #endif |
134 | 134 |
135 #if defined(OS_WIN) | 135 #if defined(OS_WIN) |
136 #include "base/metrics/histogram.h" | 136 #include "base/metrics/histogram.h" |
137 #include "base/win/windows_version.h" | 137 #include "base/win/windows_version.h" |
138 #include "skia/ext/platform_canvas.h" | 138 #include "skia/ext/platform_canvas.h" |
139 #endif | 139 #endif |
140 | 140 |
141 #if !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA) | |
142 #include "gin/public/isolate_holder.h" | |
143 #endif | |
144 | |
141 using base::StringPrintf; | 145 using base::StringPrintf; |
142 using ppapi::InputEventData; | 146 using ppapi::InputEventData; |
143 using ppapi::PpapiGlobals; | 147 using ppapi::PpapiGlobals; |
144 using ppapi::PPB_InputEvent_Shared; | 148 using ppapi::PPB_InputEvent_Shared; |
145 using ppapi::PPB_View_Shared; | 149 using ppapi::PPB_View_Shared; |
146 using ppapi::PPP_Instance_Combined; | 150 using ppapi::PPP_Instance_Combined; |
147 using ppapi::Resource; | 151 using ppapi::Resource; |
148 using ppapi::ScopedPPResource; | 152 using ppapi::ScopedPPResource; |
149 using ppapi::ScopedPPVar; | 153 using ppapi::ScopedPPVar; |
150 using ppapi::StringVar; | 154 using ppapi::StringVar; |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1400 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { | 1404 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { |
1401 text_input_type_ = type; | 1405 text_input_type_ = type; |
1402 render_frame_->PepperTextInputTypeChanged(this); | 1406 render_frame_->PepperTextInputTypeChanged(this); |
1403 } | 1407 } |
1404 | 1408 |
1405 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { | 1409 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { |
1406 if (message_channel_) | 1410 if (message_channel_) |
1407 message_channel_->PostMessageToJavaScript(message); | 1411 message_channel_->PostMessageToJavaScript(message); |
1408 } | 1412 } |
1409 | 1413 |
1414 #if !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA) | |
1415 const char* PepperPluginInstanceImpl::GetV8NativesData() const { | |
1416 return gin::IsolateHolder::GetV8NativesData(); | |
raymes
2014/11/04 22:18:13
Can we get away with not modifying pepper_plugin_i
baixo1
2014/11/07 21:35:34
I'm afraid not, Raymes.
Correct me if I'm wrong,
raymes
2014/11/10 03:29:05
No, that shouldn't be true. ppb_pdf_impl and peppe
baixo1
2014/11/10 15:59:47
If this is the case, then we can call gin from ppb
raymes
2014/11/11 02:40:19
Yep that should be fine. Thanks!
| |
1417 } | |
1418 | |
1419 const char* PepperPluginInstanceImpl::GetV8SnapshotData() const { | |
1420 return gin::IsolateHolder::GetV8SnapshotData(); | |
1421 } | |
1422 | |
1423 int PepperPluginInstanceImpl::GetV8NativesSize() const { | |
1424 return gin::IsolateHolder::GetV8NativesSize(); | |
1425 } | |
1426 | |
1427 int PepperPluginInstanceImpl::GetV8SnapshotSize() const { | |
1428 return gin::IsolateHolder::GetV8SnapshotSize(); | |
1429 } | |
1430 #endif // !defined(OS_ANDROID) && defined(V8_USE_EXTERNAL_STARTUP_DATA) | |
1431 | |
1410 int32_t PepperPluginInstanceImpl::RegisterMessageHandler( | 1432 int32_t PepperPluginInstanceImpl::RegisterMessageHandler( |
1411 PP_Instance instance, | 1433 PP_Instance instance, |
1412 void* user_data, | 1434 void* user_data, |
1413 const PPP_MessageHandler_0_2* handler, | 1435 const PPP_MessageHandler_0_2* handler, |
1414 PP_Resource message_loop) { | 1436 PP_Resource message_loop) { |
1415 // Not supported in-process. | 1437 // Not supported in-process. |
1416 NOTIMPLEMENTED(); | 1438 NOTIMPLEMENTED(); |
1417 return PP_ERROR_FAILED; | 1439 return PP_ERROR_FAILED; |
1418 } | 1440 } |
1419 | 1441 |
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3331 SendDidChangeView(); | 3353 SendDidChangeView(); |
3332 } | 3354 } |
3333 | 3355 |
3334 void PepperPluginInstanceImpl::DisablePowerSaverAndUnthrottle() { | 3356 void PepperPluginInstanceImpl::DisablePowerSaverAndUnthrottle() { |
3335 DCHECK(power_saver_enabled_); | 3357 DCHECK(power_saver_enabled_); |
3336 power_saver_enabled_ = false; | 3358 power_saver_enabled_ = false; |
3337 SetPluginThrottled(false); | 3359 SetPluginThrottled(false); |
3338 } | 3360 } |
3339 | 3361 |
3340 } // namespace content | 3362 } // namespace content |
OLD | NEW |