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

Unified Diff: webkit/plugins/ppapi/ppb_widget_impl.cc

Issue 20165002: Move webkit/plugins/ppapi to content/renderer/pepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: more more clang fun Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppb_widget_impl.h ('k') | webkit/plugins/ppapi/ppb_x509_certificate_private_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_widget_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_widget_impl.cc (revision 213561)
+++ webkit/plugins/ppapi/ppb_widget_impl.cc (working copy)
@@ -1,80 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/plugins/ppapi/ppb_widget_impl.h"
-
-#include "ppapi/c/dev/ppp_widget_dev.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_input_event_api.h"
-#include "ppapi/thunk/ppb_widget_api.h"
-#include "webkit/plugins/ppapi/ppapi_plugin_instance_impl.h"
-#include "webkit/plugins/ppapi/ppb_image_data_impl.h"
-#include "webkit/plugins/ppapi/plugin_module.h"
-#include "webkit/plugins/ppapi/resource_helper.h"
-
-using ppapi::thunk::EnterResourceNoLock;
-using ppapi::thunk::PPB_ImageData_API;
-using ppapi::thunk::PPB_InputEvent_API;
-using ppapi::thunk::PPB_Widget_API;
-
-namespace webkit {
-namespace ppapi {
-
-PPB_Widget_Impl::PPB_Widget_Impl(PP_Instance instance)
- : Resource(::ppapi::OBJECT_IS_IMPL, instance),
- scale_(1.0f) {
- memset(&location_, 0, sizeof(location_));
-}
-
-PPB_Widget_Impl::~PPB_Widget_Impl() {
-}
-
-PPB_Widget_API* PPB_Widget_Impl::AsPPB_Widget_API() {
- return this;
-}
-
-PP_Bool PPB_Widget_Impl::Paint(const PP_Rect* rect, PP_Resource image_id) {
- EnterResourceNoLock<PPB_ImageData_API> enter(image_id, true);
- if (enter.failed())
- return PP_FALSE;
- return PaintInternal(gfx::Rect(rect->point.x, rect->point.y,
- rect->size.width, rect->size.height),
- static_cast<PPB_ImageData_Impl*>(enter.object()));
-}
-
-PP_Bool PPB_Widget_Impl::HandleEvent(PP_Resource pp_input_event) {
- EnterResourceNoLock<PPB_InputEvent_API> enter(pp_input_event, true);
- if (enter.failed())
- return PP_FALSE;
- return HandleEventInternal(enter.object()->GetInputEventData());
-}
-
-PP_Bool PPB_Widget_Impl::GetLocation(PP_Rect* location) {
- *location = location_;
- return PP_TRUE;
-}
-
-void PPB_Widget_Impl::SetLocation(const PP_Rect* location) {
- location_ = *location;
- SetLocationInternal(location);
-}
-
-void PPB_Widget_Impl::SetScale(float scale) {
- scale_ = scale;
-}
-
-void PPB_Widget_Impl::Invalidate(const PP_Rect* dirty) {
- PluginInstanceImpl* plugin_instance = ResourceHelper::GetPluginInstance(this);
- if (!plugin_instance)
- return;
- const PPP_Widget_Dev* widget = static_cast<const PPP_Widget_Dev*>(
- plugin_instance->module()->GetPluginInterface(PPP_WIDGET_DEV_INTERFACE));
- if (!widget)
- return;
- widget->Invalidate(pp_instance(), pp_resource(), dirty);
-}
-
-} // namespace ppapi
-} // namespace webkit
-
« no previous file with comments | « webkit/plugins/ppapi/ppb_widget_impl.h ('k') | webkit/plugins/ppapi/ppb_x509_certificate_private_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698