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

Unified Diff: ppapi/cpp/dev/widget_dev.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 | « ppapi/cpp/dev/widget_dev.h ('k') | ppapi/cpp/dev/zoom_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/widget_dev.cc
diff --git a/ppapi/cpp/dev/widget_dev.cc b/ppapi/cpp/dev/widget_dev.cc
deleted file mode 100644
index 14efe1d68797b8f8508ec229fd569d09e185d35b..0000000000000000000000000000000000000000
--- a/ppapi/cpp/dev/widget_dev.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2010 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 "ppapi/cpp/dev/widget_dev.h"
-
-#include "ppapi/c/dev/ppb_widget_dev.h"
-#include "ppapi/cpp/image_data.h"
-#include "ppapi/cpp/input_event.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/rect.h"
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_Widget_Dev_0_3>() {
- return PPB_WIDGET_DEV_INTERFACE_0_3;
-}
-
-template <> const char* interface_name<PPB_Widget_Dev_0_4>() {
- return PPB_WIDGET_DEV_INTERFACE_0_4;
-}
-
-} // namespace
-
-Widget_Dev::Widget_Dev(PP_Resource resource) : Resource(resource) {
-}
-
-Widget_Dev::Widget_Dev(const Widget_Dev& other) : Resource(other) {
-}
-
-bool Widget_Dev::Paint(const Rect& rect, ImageData* image) {
- if (has_interface<PPB_Widget_Dev_0_4>()) {
- return PP_ToBool(get_interface<PPB_Widget_Dev_0_4>()->Paint(
- pp_resource(), &rect.pp_rect(), image->pp_resource()));
- } else if (has_interface<PPB_Widget_Dev_0_3>()) {
- return PP_ToBool(get_interface<PPB_Widget_Dev_0_3>()->Paint(
- pp_resource(), &rect.pp_rect(), image->pp_resource()));
- }
- return false;
-}
-
-bool Widget_Dev::HandleEvent(const InputEvent& event) {
- if (has_interface<PPB_Widget_Dev_0_4>()) {
- return PP_ToBool(get_interface<PPB_Widget_Dev_0_4>()->HandleEvent(
- pp_resource(), event.pp_resource()));
- } else if (has_interface<PPB_Widget_Dev_0_3>()) {
- return PP_ToBool(get_interface<PPB_Widget_Dev_0_3>()->HandleEvent(
- pp_resource(), event.pp_resource()));
- }
- return false;
-}
-
-bool Widget_Dev::GetLocation(Rect* location) {
- if (has_interface<PPB_Widget_Dev_0_4>()) {
- return PP_ToBool(get_interface<PPB_Widget_Dev_0_4>()->GetLocation(
- pp_resource(), &location->pp_rect()));
- } else if (has_interface<PPB_Widget_Dev_0_3>()) {
- return PP_ToBool(get_interface<PPB_Widget_Dev_0_3>()->GetLocation(
- pp_resource(), &location->pp_rect()));
- }
- return false;
-}
-
-void Widget_Dev::SetLocation(const Rect& location) {
- if (has_interface<PPB_Widget_Dev_0_4>()) {
- get_interface<PPB_Widget_Dev_0_4>()->SetLocation(pp_resource(),
- &location.pp_rect());
- } else if (has_interface<PPB_Widget_Dev_0_3>()) {
- get_interface<PPB_Widget_Dev_0_3>()->SetLocation(pp_resource(),
- &location.pp_rect());
- }
-}
-
-void Widget_Dev::SetScale(float scale) {
- if (has_interface<PPB_Widget_Dev_0_4>())
- get_interface<PPB_Widget_Dev_0_4>()->SetScale(pp_resource(), scale);
-}
-
-} // namespace pp
« no previous file with comments | « ppapi/cpp/dev/widget_dev.h ('k') | ppapi/cpp/dev/zoom_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698