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

Unified Diff: webkit/glue/plugins/pepper_file_chooser.cc

Issue 2800028: Simplfy Pepepr2 bolierplate code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Updated. Created 10 years, 6 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
Index: webkit/glue/plugins/pepper_file_chooser.cc
diff --git a/webkit/glue/plugins/pepper_file_chooser.cc b/webkit/glue/plugins/pepper_file_chooser.cc
index 8a5e2b0e689ed104a3ed3fa93539e06a870858ea..a2e96b26af97021707c37f754af89e652a4a42c0 100644
--- a/webkit/glue/plugins/pepper_file_chooser.cc
+++ b/webkit/glue/plugins/pepper_file_chooser.cc
@@ -27,12 +27,12 @@ PP_Resource Create(PP_Instance instance_id,
}
bool IsFileChooser(PP_Resource resource) {
- return !!ResourceTracker::Get()->GetAsFileChooser(resource).get();
+ return !!Resource::GetAs<FileChooser>(resource).get();
}
int32_t Show(PP_Resource chooser_id, PP_CompletionCallback callback) {
scoped_refptr<FileChooser> chooser(
- ResourceTracker::Get()->GetAsFileChooser(chooser_id).get());
+ Resource::GetAs<FileChooser>(chooser_id).get());
if (!chooser.get())
return PP_Error_BadResource;
@@ -41,7 +41,7 @@ int32_t Show(PP_Resource chooser_id, PP_CompletionCallback callback) {
PP_Resource GetNextChosenFile(PP_Resource chooser_id) {
scoped_refptr<FileChooser> chooser(
- ResourceTracker::Get()->GetAsFileChooser(chooser_id).get());
+ Resource::GetAs<FileChooser>(chooser_id).get());
if (!chooser.get())
return 0;

Powered by Google App Engine
This is Rietveld 408576698