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

Unified Diff: ppapi/cpp/dev/font_dev.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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/font_dev.h ('k') | ppapi/cpp/dev/fullscreen_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/font_dev.cc
diff --git a/ppapi/cpp/dev/font_dev.cc b/ppapi/cpp/dev/font_dev.cc
index 568e816776719241d5203924fc58809b06ae5a12..4c74d472903d0eeec7a63e8cf81bb627147f5ff4 100644
--- a/ppapi/cpp/dev/font_dev.cc
+++ b/ppapi/cpp/dev/font_dev.cc
@@ -7,7 +7,7 @@
#include <algorithm>
#include "ppapi/cpp/image_data.h"
-#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/point.h"
#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/module_impl.h"
@@ -102,11 +102,12 @@ Font_Dev::Font_Dev() : Resource() {
Font_Dev::Font_Dev(PP_Resource resource) : Resource(resource) {
}
-Font_Dev::Font_Dev(Instance* instance, const FontDescription_Dev& description) {
+Font_Dev::Font_Dev(const InstanceHandle& instance,
+ const FontDescription_Dev& description) {
if (!has_interface<PPB_Font_Dev>())
return;
PassRefFromConstructor(get_interface<PPB_Font_Dev>()->Create(
- instance->pp_instance(), &description.pp_font_description()));
+ instance.pp_instance(), &description.pp_font_description()));
}
Font_Dev::Font_Dev(const Font_Dev& other) : Resource(other) {
@@ -118,12 +119,11 @@ Font_Dev& Font_Dev::operator=(const Font_Dev& other) {
}
// static
-Var Font_Dev::GetFontFamilies(Instance* instance) {
+Var Font_Dev::GetFontFamilies(const InstanceHandle& instance) {
if (!has_interface<PPB_Font_Dev>())
return Var();
- return Var(Var::PassRef(),
- get_interface<PPB_Font_Dev>()->GetFontFamilies(
- instance->pp_instance()));
+ return Var(PASS_REF, get_interface<PPB_Font_Dev>()->GetFontFamilies(
+ instance.pp_instance()));
}
bool Font_Dev::Describe(FontDescription_Dev* description,
@@ -136,7 +136,7 @@ bool Font_Dev::Describe(FontDescription_Dev* description,
if (!get_interface<PPB_Font_Dev>()->Describe(
pp_resource(), &description->pp_font_description_, metrics))
return false;
- description->face_ = Var(Var::PassRef(),
+ description->face_ = Var(PASS_REF,
description->pp_font_description_.face);
return true;
« no previous file with comments | « ppapi/cpp/dev/font_dev.h ('k') | ppapi/cpp/dev/fullscreen_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698