Chromium Code Reviews| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 #if defined(OS_CHROMEOS) | 132 #if defined(OS_CHROMEOS) |
| 133 #include "ui/events/keycodes/keyboard_codes_posix.h" | 133 #include "ui/events/keycodes/keyboard_codes_posix.h" |
| 134 #endif | 134 #endif |
| 135 | 135 |
| 136 #if defined(OS_WIN) | 136 #if defined(OS_WIN) |
| 137 #include "base/metrics/histogram.h" | 137 #include "base/metrics/histogram.h" |
| 138 #include "base/win/windows_version.h" | 138 #include "base/win/windows_version.h" |
| 139 #include "skia/ext/platform_canvas.h" | 139 #include "skia/ext/platform_canvas.h" |
| 140 #endif | 140 #endif |
| 141 | 141 |
| 142 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | |
| 143 #include "gin/public/isolate_holder.h" | |
| 144 #endif | |
| 145 | |
| 142 using base::StringPrintf; | 146 using base::StringPrintf; |
| 143 using ppapi::InputEventData; | 147 using ppapi::InputEventData; |
| 144 using ppapi::PpapiGlobals; | 148 using ppapi::PpapiGlobals; |
| 145 using ppapi::PPB_InputEvent_Shared; | 149 using ppapi::PPB_InputEvent_Shared; |
| 146 using ppapi::PPB_View_Shared; | 150 using ppapi::PPB_View_Shared; |
| 147 using ppapi::PPP_Instance_Combined; | 151 using ppapi::PPP_Instance_Combined; |
| 148 using ppapi::Resource; | 152 using ppapi::Resource; |
| 149 using ppapi::ScopedPPResource; | 153 using ppapi::ScopedPPResource; |
| 150 using ppapi::ScopedPPVar; | 154 using ppapi::ScopedPPVar; |
| 151 using ppapi::StringVar; | 155 using ppapi::StringVar; |
| (...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1430 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { | 1434 void PepperPluginInstanceImpl::SetTextInputType(ui::TextInputType type) { |
| 1431 text_input_type_ = type; | 1435 text_input_type_ = type; |
| 1432 render_frame_->PepperTextInputTypeChanged(this); | 1436 render_frame_->PepperTextInputTypeChanged(this); |
| 1433 } | 1437 } |
| 1434 | 1438 |
| 1435 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { | 1439 void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) { |
| 1436 if (message_channel_) | 1440 if (message_channel_) |
| 1437 message_channel_->PostMessageToJavaScript(message); | 1441 message_channel_->PostMessageToJavaScript(message); |
| 1438 } | 1442 } |
| 1439 | 1443 |
| 1444 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | |
|
raymes
2014/11/10 03:29:06
You can move the #ifdef into the function and retu
baixo1
2014/11/10 15:59:48
Done.
baixo1
2014/11/10 17:16:49
Better yet, I made gin handle this :)
| |
| 1445 void PepperPluginInstanceImpl::GetV8ExternalSnapshotData( | |
| 1446 const char** natives_data_out, | |
| 1447 int* natives_size_out, | |
| 1448 const char** snapshot_data_out, | |
| 1449 int* snapshot_size_out) const { | |
|
raymes
2014/11/10 03:29:06
nit: the indentation looks wrong here. I think you
baixo1
2014/11/10 15:59:48
Done.
| |
| 1450 gin::IsolateHolder::GetV8ExternalSnapshotData(natives_data_out, | |
| 1451 natives_size_out, | |
| 1452 snapshot_data_out, | |
| 1453 snapshot_size_out); | |
| 1454 } | |
| 1455 #endif | |
| 1456 | |
| 1440 int32_t PepperPluginInstanceImpl::RegisterMessageHandler( | 1457 int32_t PepperPluginInstanceImpl::RegisterMessageHandler( |
| 1441 PP_Instance instance, | 1458 PP_Instance instance, |
| 1442 void* user_data, | 1459 void* user_data, |
| 1443 const PPP_MessageHandler_0_2* handler, | 1460 const PPP_MessageHandler_0_2* handler, |
| 1444 PP_Resource message_loop) { | 1461 PP_Resource message_loop) { |
| 1445 // Not supported in-process. | 1462 // Not supported in-process. |
| 1446 NOTIMPLEMENTED(); | 1463 NOTIMPLEMENTED(); |
| 1447 return PP_ERROR_FAILED; | 1464 return PP_ERROR_FAILED; |
| 1448 } | 1465 } |
| 1449 | 1466 |
| (...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3366 return; | 3383 return; |
| 3367 | 3384 |
| 3368 is_peripheral_content_ = false; | 3385 is_peripheral_content_ = false; |
| 3369 power_saver_enabled_ = false; | 3386 power_saver_enabled_ = false; |
| 3370 SetPluginThrottled(false); | 3387 SetPluginThrottled(false); |
| 3371 | 3388 |
| 3372 RecordUnthrottleMethodMetric(UNTHROTTLE_METHOD_BY_WHITELIST); | 3389 RecordUnthrottleMethodMetric(UNTHROTTLE_METHOD_BY_WHITELIST); |
| 3373 } | 3390 } |
| 3374 | 3391 |
| 3375 } // namespace content | 3392 } // namespace content |
| OLD | NEW |