Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Current state (presubmit warnings, cc_unittests tests failing) Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 2108
2109 void PepperPluginInstanceImpl::AddLatencyInfo( 2109 void PepperPluginInstanceImpl::AddLatencyInfo(
2110 const std::vector<ui::LatencyInfo>& latency_info) { 2110 const std::vector<ui::LatencyInfo>& latency_info) {
2111 if (render_frame_ && render_frame_->GetRenderWidget()) { 2111 if (render_frame_ && render_frame_->GetRenderWidget()) {
2112 RenderWidgetCompositor* compositor = 2112 RenderWidgetCompositor* compositor =
2113 render_frame_->GetRenderWidget()->compositor(); 2113 render_frame_->GetRenderWidget()->compositor();
2114 if (compositor) { 2114 if (compositor) {
2115 for (size_t i = 0; i < latency_info.size(); i++) { 2115 for (size_t i = 0; i < latency_info.size(); i++) {
2116 scoped_ptr<cc::SwapPromise> swap_promise( 2116 scoped_ptr<cc::SwapPromise> swap_promise(
2117 new cc::LatencyInfoSwapPromise(latency_info[i])); 2117 new cc::LatencyInfoSwapPromise(latency_info[i]));
2118 compositor->QueueSwapPromise(swap_promise.Pass()); 2118 compositor->QueuePromise(swap_promise.Pass());
2119 } 2119 }
2120 } 2120 }
2121 } 2121 }
2122 } 2122 }
2123 2123
2124 void PepperPluginInstanceImpl::AddPluginObject(PluginObject* plugin_object) { 2124 void PepperPluginInstanceImpl::AddPluginObject(PluginObject* plugin_object) {
2125 DCHECK(live_plugin_objects_.find(plugin_object) == 2125 DCHECK(live_plugin_objects_.find(plugin_object) ==
2126 live_plugin_objects_.end()); 2126 live_plugin_objects_.end());
2127 live_plugin_objects_.insert(plugin_object); 2127 live_plugin_objects_.insert(plugin_object);
2128 } 2128 }
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
3342 3342
3343 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3343 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3344 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3344 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3345 javascript_used_ = true; 3345 javascript_used_ = true;
3346 RenderThread::Get()->RecordAction( 3346 RenderThread::Get()->RecordAction(
3347 base::UserMetricsAction("Flash.JavaScriptUsed")); 3347 base::UserMetricsAction("Flash.JavaScriptUsed"));
3348 } 3348 }
3349 } 3349 }
3350 3350
3351 } // namespace content 3351 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698