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

Unified Diff: content/renderer/pepper/ppb_widget_impl.cc

Issue 1161563002: Remove unused in-process pepper APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/ppb_widget_impl.h ('k') | content/renderer/pepper/resource_creation_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_widget_impl.cc
diff --git a/content/renderer/pepper/ppb_widget_impl.cc b/content/renderer/pepper/ppb_widget_impl.cc
deleted file mode 100644
index c28d566d7330a0e59a86614191801197bb25ffe0..0000000000000000000000000000000000000000
--- a/content/renderer/pepper/ppb_widget_impl.cc
+++ /dev/null
@@ -1,73 +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 "content/renderer/pepper/ppb_widget_impl.h"
-
-#include "content/renderer/pepper/host_globals.h"
-#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
-#include "content/renderer/pepper/ppb_image_data_impl.h"
-#include "content/renderer/pepper/plugin_module.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"
-
-using ppapi::thunk::EnterResourceNoLock;
-using ppapi::thunk::PPB_ImageData_API;
-using ppapi::thunk::PPB_InputEvent_API;
-using ppapi::thunk::PPB_Widget_API;
-
-namespace content {
-
-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) {
- PepperPluginInstanceImpl* plugin_instance =
- HostGlobals::Get()->GetInstance(pp_instance());
- 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 content
« no previous file with comments | « content/renderer/pepper/ppb_widget_impl.h ('k') | content/renderer/pepper/resource_creation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698