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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 12774006: cc: Chromify Layer and LayerImpl classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MoreAndroidCompilings Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/webplugin_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 if (bound_graphics_3d_.get()) 514 if (bound_graphics_3d_.get())
515 return bound_graphics_3d_->GetBackingTextureId(); 515 return bound_graphics_3d_->GetBackingTextureId();
516 516
517 return 0; 517 return 0;
518 } 518 }
519 519
520 void PluginInstance::CommitBackingTexture() { 520 void PluginInstance::CommitBackingTexture() {
521 if (fullscreen_container_) 521 if (fullscreen_container_)
522 fullscreen_container_->Invalidate(); 522 fullscreen_container_->Invalidate();
523 else if (texture_layer_) 523 else if (texture_layer_)
524 texture_layer_->setNeedsDisplay(); 524 texture_layer_->SetNeedsDisplay();
525 } 525 }
526 526
527 void PluginInstance::InstanceCrashed() { 527 void PluginInstance::InstanceCrashed() {
528 // Force free all resources and vars. 528 // Force free all resources and vars.
529 HostGlobals::Get()->InstanceCrashed(pp_instance()); 529 HostGlobals::Get()->InstanceCrashed(pp_instance());
530 530
531 // Free any associated graphics. 531 // Free any associated graphics.
532 SetFullscreen(false); 532 SetFullscreen(false);
533 FlashSetFullscreen(false, false); 533 FlashSetFullscreen(false, false);
534 // Unbind current 2D or 3D graphics context. 534 // Unbind current 2D or 3D graphics context.
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 return; 1708 return;
1709 1709
1710 if (!want_layer) { 1710 if (!want_layer) {
1711 texture_layer_->willModifyTexture(); 1711 texture_layer_->willModifyTexture();
1712 texture_layer_->clearClient(); 1712 texture_layer_->clearClient();
1713 container_->setWebLayer(NULL); 1713 container_->setWebLayer(NULL);
1714 web_layer_.reset(); 1714 web_layer_.reset();
1715 texture_layer_ = NULL; 1715 texture_layer_ = NULL;
1716 } else { 1716 } else {
1717 DCHECK(bound_graphics_3d_.get()); 1717 DCHECK(bound_graphics_3d_.get());
1718 texture_layer_ = cc::TextureLayer::create(this); 1718 texture_layer_ = cc::TextureLayer::Create(this);
1719 web_layer_.reset(new WebKit::WebLayerImpl(texture_layer_)); 1719 web_layer_.reset(new WebKit::WebLayerImpl(texture_layer_));
1720 container_->setWebLayer(web_layer_.get()); 1720 container_->setWebLayer(web_layer_.get());
1721 texture_layer_->setContentsOpaque(bound_graphics_3d_->IsOpaque()); 1721 texture_layer_->SetContentsOpaque(bound_graphics_3d_->IsOpaque());
1722 } 1722 }
1723 } 1723 }
1724 1724
1725 void PluginInstance::AddPluginObject(PluginObject* plugin_object) { 1725 void PluginInstance::AddPluginObject(PluginObject* plugin_object) {
1726 DCHECK(live_plugin_objects_.find(plugin_object) == 1726 DCHECK(live_plugin_objects_.find(plugin_object) ==
1727 live_plugin_objects_.end()); 1727 live_plugin_objects_.end());
1728 live_plugin_objects_.insert(plugin_object); 1728 live_plugin_objects_.insert(plugin_object);
1729 } 1729 }
1730 1730
1731 void PluginInstance::RemovePluginObject(PluginObject* plugin_object) { 1731 void PluginInstance::RemovePluginObject(PluginObject* plugin_object) {
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 screen_size_for_fullscreen_ = gfx::Size(); 2483 screen_size_for_fullscreen_ = gfx::Size();
2484 WebElement element = container_->element(); 2484 WebElement element = container_->element();
2485 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2485 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2486 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2486 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2487 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2487 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2488 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2488 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2489 } 2489 }
2490 2490
2491 } // namespace ppapi 2491 } // namespace ppapi
2492 } // namespace webkit 2492 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698