| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 } | 349 } |
| 350 #endif // defined(OS_CHROMEOS) | 350 #endif // defined(OS_CHROMEOS) |
| 351 return false; | 351 return false; |
| 352 } | 352 } |
| 353 | 353 |
| 354 class PluginInstanceLockTarget : public MouseLockDispatcher::LockTarget { | 354 class PluginInstanceLockTarget : public MouseLockDispatcher::LockTarget { |
| 355 public: | 355 public: |
| 356 PluginInstanceLockTarget(PepperPluginInstanceImpl* plugin) | 356 PluginInstanceLockTarget(PepperPluginInstanceImpl* plugin) |
| 357 : plugin_(plugin) {} | 357 : plugin_(plugin) {} |
| 358 | 358 |
| 359 virtual void OnLockMouseACK(bool succeeded) override { | 359 void OnLockMouseACK(bool succeeded) override { |
| 360 plugin_->OnLockMouseACK(succeeded); | 360 plugin_->OnLockMouseACK(succeeded); |
| 361 } | 361 } |
| 362 | 362 |
| 363 virtual void OnMouseLockLost() override { plugin_->OnMouseLockLost(); } | 363 void OnMouseLockLost() override { plugin_->OnMouseLockLost(); } |
| 364 | 364 |
| 365 virtual bool HandleMouseLockedInputEvent(const blink::WebMouseEvent& event) | 365 bool HandleMouseLockedInputEvent(const blink::WebMouseEvent& event) override { |
| 366 override { | |
| 367 plugin_->HandleMouseLockedInputEvent(event); | 366 plugin_->HandleMouseLockedInputEvent(event); |
| 368 return true; | 367 return true; |
| 369 } | 368 } |
| 370 | 369 |
| 371 private: | 370 private: |
| 372 PepperPluginInstanceImpl* plugin_; | 371 PepperPluginInstanceImpl* plugin_; |
| 373 }; | 372 }; |
| 374 | 373 |
| 375 void InitLatencyInfo(ui::LatencyInfo* new_latency, | 374 void InitLatencyInfo(ui::LatencyInfo* new_latency, |
| 376 const ui::LatencyInfo* old_latency, | 375 const ui::LatencyInfo* old_latency, |
| (...skipping 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3303 void PepperPluginInstanceImpl::SetPluginThrottled(bool throttled) { | 3302 void PepperPluginInstanceImpl::SetPluginThrottled(bool throttled) { |
| 3304 // Do not throttle if we've already disabled power saver. | 3303 // Do not throttle if we've already disabled power saver. |
| 3305 if (!power_saver_enabled_ && throttled) | 3304 if (!power_saver_enabled_ && throttled) |
| 3306 return; | 3305 return; |
| 3307 | 3306 |
| 3308 plugin_throttled_ = throttled; | 3307 plugin_throttled_ = throttled; |
| 3309 SendDidChangeView(); | 3308 SendDidChangeView(); |
| 3310 } | 3309 } |
| 3311 | 3310 |
| 3312 } // namespace content | 3311 } // namespace content |
| OLD | NEW |