diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-14 11:38:45 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-14 17:16:47 +0000 |
commit | 3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 (patch) | |
tree | 43cc572ba067417c7341db81f71ae7cc6e0fcc3e /chromium/ppapi/cpp | |
parent | f61ab1ac7f855cd281809255c0aedbb1895e1823 (diff) | |
download | qtwebengine-chromium-3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859.tar.gz |
BASELINE: Update chromium to 45.0.2454.40
Change-Id: Id2121d9f11a8fc633677236c65a3e41feef589e4
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/ppapi/cpp')
-rw-r--r-- | chromium/ppapi/cpp/dev/scrollbar_dev.cc | 87 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/scrollbar_dev.h | 39 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/selection_dev.cc | 44 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/selection_dev.h | 52 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/widget_client_dev.cc | 88 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/widget_client_dev.h | 52 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/widget_dev.cc | 83 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/widget_dev.h | 37 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/zoom_dev.cc | 62 | ||||
-rw-r--r-- | chromium/ppapi/cpp/dev/zoom_dev.h | 59 | ||||
-rw-r--r-- | chromium/ppapi/cpp/private/pdf.cc | 52 | ||||
-rw-r--r-- | chromium/ppapi/cpp/private/pdf.h | 10 | ||||
-rw-r--r-- | chromium/ppapi/cpp/video_encoder.h | 5 | ||||
-rw-r--r-- | chromium/ppapi/cpp/view.h | 2 |
14 files changed, 3 insertions, 669 deletions
diff --git a/chromium/ppapi/cpp/dev/scrollbar_dev.cc b/chromium/ppapi/cpp/dev/scrollbar_dev.cc deleted file mode 100644 index 26eb9ef0b84..00000000000 --- a/chromium/ppapi/cpp/dev/scrollbar_dev.cc +++ /dev/null @@ -1,87 +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 <vector> - -#include "ppapi/cpp/dev/scrollbar_dev.h" - -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" -#include "ppapi/cpp/rect.h" - -namespace pp { - -namespace { - -template <> const char* interface_name<PPB_Scrollbar_Dev>() { - return PPB_SCROLLBAR_DEV_INTERFACE; -} - -} // namespace - -Scrollbar_Dev::Scrollbar_Dev(PP_Resource resource) : Widget_Dev(resource) { -} - -Scrollbar_Dev::Scrollbar_Dev(const InstanceHandle& instance, bool vertical) { - if (!has_interface<PPB_Scrollbar_Dev>()) - return; - PassRefFromConstructor(get_interface<PPB_Scrollbar_Dev>()->Create( - instance.pp_instance(), PP_FromBool(vertical))); -} - -Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other) - : Widget_Dev(other) { -} - -uint32_t Scrollbar_Dev::GetThickness() { - if (!has_interface<PPB_Scrollbar_Dev>()) - return 0; - return get_interface<PPB_Scrollbar_Dev>()->GetThickness(pp_resource()); -} - -bool Scrollbar_Dev::IsOverlay() { - if (!has_interface<PPB_Scrollbar_Dev>()) - return false; - return - PP_ToBool(get_interface<PPB_Scrollbar_Dev>()->IsOverlay(pp_resource())); -} - -uint32_t Scrollbar_Dev::GetValue() { - if (!has_interface<PPB_Scrollbar_Dev>()) - return 0; - return get_interface<PPB_Scrollbar_Dev>()->GetValue(pp_resource()); -} - -void Scrollbar_Dev::SetValue(uint32_t value) { - if (has_interface<PPB_Scrollbar_Dev>()) - get_interface<PPB_Scrollbar_Dev>()->SetValue(pp_resource(), value); -} - -void Scrollbar_Dev::SetDocumentSize(uint32_t size) { - if (has_interface<PPB_Scrollbar_Dev>()) - get_interface<PPB_Scrollbar_Dev>()->SetDocumentSize(pp_resource(), size); -} - -void Scrollbar_Dev::SetTickMarks(const Rect* tick_marks, uint32_t count) { - if (!has_interface<PPB_Scrollbar_Dev>()) - return; - - std::vector<PP_Rect> temp; - temp.resize(count); - for (uint32_t i = 0; i < count; ++i) - temp[i] = tick_marks[i]; - - get_interface<PPB_Scrollbar_Dev>()->SetTickMarks( - pp_resource(), count ? &temp[0] : NULL, count); -} - -void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { - if (has_interface<PPB_Scrollbar_Dev>()) - get_interface<PPB_Scrollbar_Dev>()->ScrollBy(pp_resource(), - unit, - multiplier); -} - -} // namespace pp diff --git a/chromium/ppapi/cpp/dev/scrollbar_dev.h b/chromium/ppapi/cpp/dev/scrollbar_dev.h deleted file mode 100644 index fabbbd7f471..00000000000 --- a/chromium/ppapi/cpp/dev/scrollbar_dev.h +++ /dev/null @@ -1,39 +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. - -#ifndef PPAPI_CPP_DEV_SCROLLBAR_DEV_H_ -#define PPAPI_CPP_DEV_SCROLLBAR_DEV_H_ - -#include "ppapi/c/dev/ppb_scrollbar_dev.h" -#include "ppapi/cpp/dev/widget_dev.h" - -namespace pp { - -class InstanceHandle; - -// This class allows a plugin to use the browser's scrollbar widget. -class Scrollbar_Dev : public Widget_Dev { - public: - // Creates an is_null() Scrollbar object. - Scrollbar_Dev() {} - - explicit Scrollbar_Dev(PP_Resource resource); - Scrollbar_Dev(const InstanceHandle& instance, bool vertical); - Scrollbar_Dev(const Scrollbar_Dev& other); - - Scrollbar_Dev& operator=(const Scrollbar_Dev& other); - - // PPB_Scrollbar methods: - uint32_t GetThickness(); - bool IsOverlay(); - uint32_t GetValue(); - void SetValue(uint32_t value); - void SetDocumentSize(uint32_t size); - void SetTickMarks(const Rect* tick_marks, uint32_t count); - void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier); -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_SCROLLBAR_DEV_H_ diff --git a/chromium/ppapi/cpp/dev/selection_dev.cc b/chromium/ppapi/cpp/dev/selection_dev.cc deleted file mode 100644 index 7e1284bb66f..00000000000 --- a/chromium/ppapi/cpp/dev/selection_dev.cc +++ /dev/null @@ -1,44 +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/selection_dev.h" - -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/var.h" - -namespace pp { - -namespace { - -static const char kPPPSelectionInterface[] = PPP_SELECTION_DEV_INTERFACE; - -PP_Var GetSelectedText(PP_Instance instance, PP_Bool html) { - void* object = - pp::Instance::GetPerInstanceObject(instance, kPPPSelectionInterface); - if (!object) - return Var().Detach(); - return static_cast<Selection_Dev*>(object)-> - GetSelectedText(PP_ToBool(html)).Detach(); -} - -const PPP_Selection_Dev ppp_selection = { - &GetSelectedText -}; - -} // namespace - -Selection_Dev::Selection_Dev(Instance* instance) - : associated_instance_(instance) { - Module::Get()->AddPluginInterface(kPPPSelectionInterface, &ppp_selection); - instance->AddPerInstanceObject(kPPPSelectionInterface, this); -} - -Selection_Dev::~Selection_Dev() { - Instance::RemovePerInstanceObject(associated_instance_, - kPPPSelectionInterface, this); -} - -} // namespace pp diff --git a/chromium/ppapi/cpp/dev/selection_dev.h b/chromium/ppapi/cpp/dev/selection_dev.h deleted file mode 100644 index 629d3610974..00000000000 --- a/chromium/ppapi/cpp/dev/selection_dev.h +++ /dev/null @@ -1,52 +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. - -#ifndef PPAPI_CPP_DEV_SELECTION_DEV_H_ -#define PPAPI_CPP_DEV_SELECTION_DEV_H_ - -#include "ppapi/c/dev/ppp_selection_dev.h" -#include "ppapi/cpp/instance_handle.h" - -namespace pp { - -class Var; - -// This class allows you to associate the PPP_Selection_Dev C-based interface -// with an object. It registers as the global handler for handling the -// PPP_Selection_Dev interface that the browser calls. -// -// You would typically use this either via inheritance on your instance: -// class MyInstance : public pp::Instance, public pp::Selection_Dev { -// class MyInstance() : pp::Selection_Dev(this) { -// } -// ... -// }; -// -// or by composition: -// class MySelection : public pp::Selection_Dev { -// ... -// }; -// -// class MyInstance : public pp::Instance { -// MyInstance() : selection_(this) { -// } -// -// MySelection selection_; -// }; -class Selection_Dev { - public: - explicit Selection_Dev(Instance* instance); - virtual ~Selection_Dev(); - - // PPP_Selection_Dev functions exposed as virtual functions for you to - // override. - virtual Var GetSelectedText(bool html) = 0; - - private: - InstanceHandle associated_instance_; -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_SELECTION_DEV_H_ diff --git a/chromium/ppapi/cpp/dev/widget_client_dev.cc b/chromium/ppapi/cpp/dev/widget_client_dev.cc deleted file mode 100644 index 731f2922778..00000000000 --- a/chromium/ppapi/cpp/dev/widget_client_dev.cc +++ /dev/null @@ -1,88 +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_client_dev.h" - -#include "ppapi/c/dev/ppp_scrollbar_dev.h" -#include "ppapi/c/dev/ppp_widget_dev.h" -#include "ppapi/cpp/dev/scrollbar_dev.h" -#include "ppapi/cpp/dev/widget_dev.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" -#include "ppapi/cpp/rect.h" - -namespace pp { - -namespace { - -// PPP_Widget_Dev -------------------------------------------------------------- - -const char kPPPWidgetInterface[] = PPP_WIDGET_DEV_INTERFACE; - -void Widget_Invalidate(PP_Instance instance, - PP_Resource widget_id, - const PP_Rect* dirty_rect) { - void* object = Instance::GetPerInstanceObject(instance, kPPPWidgetInterface); - if (!object) - return; - return static_cast<WidgetClient_Dev*>(object)->InvalidateWidget( - Widget_Dev(widget_id), *dirty_rect); -} - -static PPP_Widget_Dev widget_interface = { - &Widget_Invalidate, -}; - -// PPP_Scrollbar_Dev ----------------------------------------------------------- - -const char kPPPScrollbarInterface[] = PPP_SCROLLBAR_DEV_INTERFACE; - -void Scrollbar_ValueChanged(PP_Instance instance, - PP_Resource scrollbar_id, - uint32_t value) { - void* object = - Instance::GetPerInstanceObject(instance, kPPPScrollbarInterface); - if (!object) - return; - return static_cast<WidgetClient_Dev*>(object)->ScrollbarValueChanged( - Scrollbar_Dev(scrollbar_id), value); -} - -void Scrollbar_OverlayChanged(PP_Instance instance, - PP_Resource scrollbar_id, - PP_Bool overlay) { - void* object = - Instance::GetPerInstanceObject(instance, kPPPScrollbarInterface); - if (!object) - return; - return static_cast<WidgetClient_Dev*>(object)->ScrollbarOverlayChanged( - Scrollbar_Dev(scrollbar_id), PP_ToBool(overlay)); -} - -static PPP_Scrollbar_Dev scrollbar_interface = { - &Scrollbar_ValueChanged, - &Scrollbar_OverlayChanged, -}; - -} // namespace - -WidgetClient_Dev::WidgetClient_Dev(Instance* instance) - : associated_instance_(instance) { - Module::Get()->AddPluginInterface(kPPPWidgetInterface, &widget_interface); - instance->AddPerInstanceObject(kPPPWidgetInterface, this); - Module::Get()->AddPluginInterface(kPPPScrollbarInterface, - &scrollbar_interface); - instance->AddPerInstanceObject(kPPPScrollbarInterface, this); -} - -WidgetClient_Dev::~WidgetClient_Dev() { - Instance::RemovePerInstanceObject(associated_instance_, - kPPPScrollbarInterface, this); - Instance::RemovePerInstanceObject(associated_instance_, - kPPPWidgetInterface, this); -} - -} // namespace pp diff --git a/chromium/ppapi/cpp/dev/widget_client_dev.h b/chromium/ppapi/cpp/dev/widget_client_dev.h deleted file mode 100644 index c638cef66ae..00000000000 --- a/chromium/ppapi/cpp/dev/widget_client_dev.h +++ /dev/null @@ -1,52 +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. - -#ifndef PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ -#define PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ - -#include "ppapi/c/pp_stdint.h" -#include "ppapi/cpp/instance_handle.h" - -namespace pp { - -class Instance; -class Rect; -class Scrollbar_Dev; -class Widget_Dev; - -// This class provides a C++ interface for callbacks related to widgets. You -// would normally use multiple inheritance to derive from this class in your -// instance. -class WidgetClient_Dev { - public: - explicit WidgetClient_Dev(Instance* instance); - virtual ~WidgetClient_Dev(); - - /** - * Notification that the given widget should be repainted. This is the - * implementation for PPP_Widget_Dev. - */ - virtual void InvalidateWidget(Widget_Dev widget, const Rect& dirty_rect) = 0; - - /** - * Notification that the given scrollbar should change value. This is the - * implementation for PPP_Scrollbar_Dev. - */ - virtual void ScrollbarValueChanged(Scrollbar_Dev scrollbar, - uint32_t value) = 0; - - /** - * Notification that the given scrollbar's overlay type has changed. This is - * the implementation for PPP_Scrollbar_Dev. - */ - virtual void ScrollbarOverlayChanged(Scrollbar_Dev scrollbar, - bool type) = 0; - - private: - InstanceHandle associated_instance_; -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ diff --git a/chromium/ppapi/cpp/dev/widget_dev.cc b/chromium/ppapi/cpp/dev/widget_dev.cc deleted file mode 100644 index 14efe1d6879..00000000000 --- a/chromium/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 diff --git a/chromium/ppapi/cpp/dev/widget_dev.h b/chromium/ppapi/cpp/dev/widget_dev.h deleted file mode 100644 index ef14c3cf7de..00000000000 --- a/chromium/ppapi/cpp/dev/widget_dev.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef PPAPI_CPP_DEV_WIDGET_DEV_H_ -#define PPAPI_CPP_DEV_WIDGET_DEV_H_ - -#include "ppapi/c/pp_stdint.h" -#include "ppapi/cpp/resource.h" - -namespace pp { - -class ImageData; -class InputEvent; -class Rect; - -// This is the base class for widget elements. As such, it can't be created -// directly. -class Widget_Dev : public Resource { - public: - // Creates an is_null() Widget object. - Widget_Dev() {} - - explicit Widget_Dev(PP_Resource resource); - Widget_Dev(const Widget_Dev& other); - - // PPB_Widget methods: - bool Paint(const Rect& rect, ImageData* image); - bool HandleEvent(const InputEvent& event); - bool GetLocation(Rect* location); - void SetLocation(const Rect& location); - void SetScale(float scale); -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_WIDGET_DEV_H_ diff --git a/chromium/ppapi/cpp/dev/zoom_dev.cc b/chromium/ppapi/cpp/dev/zoom_dev.cc deleted file mode 100644 index 0b19c09935a..00000000000 --- a/chromium/ppapi/cpp/dev/zoom_dev.cc +++ /dev/null @@ -1,62 +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/zoom_dev.h" - -#include "ppapi/c/dev/ppb_zoom_dev.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" - -namespace pp { - -namespace { - -static const char kPPPZoomInterface[] = PPP_ZOOM_DEV_INTERFACE; - -void Zoom(PP_Instance instance, - double factor, - PP_Bool text_only) { - void* object = Instance::GetPerInstanceObject(instance, kPPPZoomInterface); - if (!object) - return; - static_cast<Zoom_Dev*>(object)->Zoom(factor, PP_ToBool(text_only)); -} - -const PPP_Zoom_Dev ppp_zoom = { - &Zoom -}; - -template <> const char* interface_name<PPB_Zoom_Dev>() { - return PPB_ZOOM_DEV_INTERFACE; -} - -} // namespace - -Zoom_Dev::Zoom_Dev(Instance* instance) : associated_instance_(instance) { - Module::Get()->AddPluginInterface(kPPPZoomInterface, &ppp_zoom); - instance->AddPerInstanceObject(kPPPZoomInterface, this); -} - -Zoom_Dev::~Zoom_Dev() { - Instance::RemovePerInstanceObject(associated_instance_, - kPPPZoomInterface, this); -} - -void Zoom_Dev::ZoomChanged(double factor) { - if (has_interface<PPB_Zoom_Dev>()) - get_interface<PPB_Zoom_Dev>()->ZoomChanged( - associated_instance_.pp_instance(), factor); -} - -void Zoom_Dev::ZoomLimitsChanged(double minimum_factor, - double maximium_factor) { - if (!has_interface<PPB_Zoom_Dev>()) - return; - get_interface<PPB_Zoom_Dev>()->ZoomLimitsChanged( - associated_instance_.pp_instance(), minimum_factor, maximium_factor); -} - -} // namespace pp diff --git a/chromium/ppapi/cpp/dev/zoom_dev.h b/chromium/ppapi/cpp/dev/zoom_dev.h deleted file mode 100644 index b63c0195da7..00000000000 --- a/chromium/ppapi/cpp/dev/zoom_dev.h +++ /dev/null @@ -1,59 +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. - -#ifndef PPAPI_CPP_DEV_ZOOM_DEV_H_ -#define PPAPI_CPP_DEV_ZOOM_DEV_H_ - -#include <string> - -#include "ppapi/c/dev/ppp_zoom_dev.h" -#include "ppapi/cpp/instance_handle.h" - -namespace pp { - -class Instance; - -// This class allows you to associate the PPP_Zoom_Dev and PPB_Zoom_Dev C-based -// interfaces with an object. It associates itself with the given instance, and -// registers as the global handler for handling the PPP_Zoom_Dev interface that -// the browser calls. -// -// You would typically use this either via inheritance on your instance: -// class MyInstance : public pp::Instance, public pp::Zoom_Dev { -// class MyInstance() : pp::Zoom_Dev(this) { -// } -// ... -// }; -// -// or by composition: -// class MyZoom : public pp::Zoom_Dev { -// ... -// }; -// -// class MyInstance : public pp::Instance { -// MyInstance() : zoom_(this) { -// } -// -// MyZoom zoom_; -// }; -class Zoom_Dev { - public: - explicit Zoom_Dev(Instance* instance); - virtual ~Zoom_Dev(); - - // PPP_Zoom_Dev functions exposed as virtual functions for you to - // override. - virtual void Zoom(double factor, bool text_only) = 0; - - // PPB_Zoom_Def functions for you to call to report new zoom factor. - void ZoomChanged(double factor); - void ZoomLimitsChanged(double minimum_factor, double maximium_factor); - - private: - InstanceHandle associated_instance_; -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_ZOOM_DEV_H_ diff --git a/chromium/ppapi/cpp/private/pdf.cc b/chromium/ppapi/cpp/private/pdf.cc index 17b0b4d2a71..24127f10689 100644 --- a/chromium/ppapi/cpp/private/pdf.cc +++ b/chromium/ppapi/cpp/private/pdf.cc @@ -37,17 +37,6 @@ Var PDF::GetLocalizedString(const InstanceHandle& instance, } // static -ImageData PDF::GetResourceImage(const InstanceHandle& instance, - PP_ResourceImage image_id) { - if (has_interface<PPB_PDF>()) { - return ImageData(PASS_REF, - get_interface<PPB_PDF>()->GetResourceImage( - instance.pp_instance(), image_id)); - } - return ImageData(); -} - -// static PP_Resource PDF::GetFontFileWithFallback( const InstanceHandle& instance, const PP_BrowserFont_Trusted_Description* description, @@ -106,14 +95,6 @@ void PDF::SetContentRestriction(const InstanceHandle& instance, } // static -void PDF::HistogramPDFPageCount(const InstanceHandle& instance, - int count) { - if (has_interface<PPB_PDF>()) - get_interface<PPB_PDF>()->HistogramPDFPageCount(instance.pp_instance(), - count); -} - -// static void PDF::UserMetricsRecordAction(const InstanceHandle& instance, const Var& action) { if (has_interface<PPB_PDF>()) { @@ -150,39 +131,6 @@ bool PDF::IsFeatureEnabled(const InstanceHandle& instance, } // static -ImageData PDF::GetResourceImageForScale(const InstanceHandle& instance, - PP_ResourceImage image_id, - float scale) { - if (has_interface<PPB_PDF>()) { - return ImageData(PASS_REF, - get_interface<PPB_PDF>()->GetResourceImageForScale( - instance.pp_instance(), image_id, scale)); - } - return ImageData(); -} - -// static -Var PDF::ModalPromptForPassword(const InstanceHandle& instance, - Var message) { - if (has_interface<PPB_PDF>()) { - return Var(PASS_REF, - get_interface<PPB_PDF>()->ModalPromptForPassword( - instance.pp_instance(), - message.pp_var())); - } - return Var(); -} - -// static -bool PDF::IsOutOfProcess(const InstanceHandle& instance) { - if (has_interface<PPB_PDF>()) { - return PP_ToBool(get_interface<PPB_PDF>()->IsOutOfProcess( - instance.pp_instance())); - } - return false; -} - -// static void PDF::SetSelectedText(const InstanceHandle& instance, const char* selected_text) { if (has_interface<PPB_PDF>()) { diff --git a/chromium/ppapi/cpp/private/pdf.h b/chromium/ppapi/cpp/private/pdf.h index 160c8264269..48ba668e3f9 100644 --- a/chromium/ppapi/cpp/private/pdf.h +++ b/chromium/ppapi/cpp/private/pdf.h @@ -24,8 +24,6 @@ class PDF { static Var GetLocalizedString(const InstanceHandle& instance, PP_ResourceString string_id); - static ImageData GetResourceImage(const InstanceHandle& instance, - PP_ResourceImage image_id); static PP_Resource GetFontFileWithFallback( const InstanceHandle& instance, const PP_BrowserFont_Trusted_Description* description, @@ -44,8 +42,6 @@ class PDF { static void DidStopLoading(const InstanceHandle& instance); static void SetContentRestriction(const InstanceHandle& instance, int restrictions); - static void HistogramPDFPageCount(const InstanceHandle& instance, - int count); static void UserMetricsRecordAction(const InstanceHandle& instance, const Var& action); static void HasUnsupportedFeature(const InstanceHandle& instance); @@ -53,12 +49,6 @@ class PDF { static void Print(const InstanceHandle& instance); static bool IsFeatureEnabled(const InstanceHandle& instance, PP_PDFFeature feature); - static ImageData GetResourceImageForScale(const InstanceHandle& instance, - PP_ResourceImage image_id, - float scale); - static Var ModalPromptForPassword(const InstanceHandle& instance, - Var message); - static bool IsOutOfProcess(const InstanceHandle& instance); static void SetSelectedText(const InstanceHandle& instance, const char* selected_text); static void SetLinkUnderCursor(const InstanceHandle& instance, diff --git a/chromium/ppapi/cpp/video_encoder.h b/chromium/ppapi/cpp/video_encoder.h index 44160d90168..e3b3d3e60a4 100644 --- a/chromium/ppapi/cpp/video_encoder.h +++ b/chromium/ppapi/cpp/video_encoder.h @@ -38,9 +38,8 @@ class InstanceHandle; /// it. Any pending callbacks will abort before the encoder is destroyed. /// /// Available video codecs vary by platform. -/// All: theora, vorbis, vp8. -/// Chrome and ChromeOS: h264. -/// ChromeOS: mpeg4. +/// All: vp8 (software). +/// ChromeOS, depending on your device: h264 (hardware), vp8 (hardware) class VideoEncoder : public Resource { public: /// Default constructor for creating an is_null() <code>VideoEncoder</code> diff --git a/chromium/ppapi/cpp/view.h b/chromium/ppapi/cpp/view.h index 13c7a81b587..7abcac79148 100644 --- a/chromium/ppapi/cpp/view.h +++ b/chromium/ppapi/cpp/view.h @@ -24,7 +24,7 @@ class View : public Resource { /// Creates a View resource, taking and holding an additional reference to /// the given resource handle. - View(PP_Resource view_resource); + explicit View(PP_Resource view_resource); /// GetRect() retrieves the rectangle of the module instance associated /// with a view changed notification relative to the upper-left of the browser |