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

Unified Diff: content/public/browser/font_list_async.h

Issue 9500008: Move font_list_async.h to content/public. Switch to Pass() goodness to simplify code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix clang 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 | « content/content_browser.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/font_list_async.h
===================================================================
--- content/public/browser/font_list_async.h (revision 124079)
+++ content/public/browser/font_list_async.h (working copy)
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_FONT_LIST_ASYNC_H_
-#define CONTENT_BROWSER_FONT_LIST_ASYNC_H_
+#ifndef CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
+#define CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
#include "base/callback_forward.h"
-#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
@@ -16,17 +15,6 @@
namespace content {
-// Wraps ownership of a ListValue so we can send it across threads without
-// having ownership problems (for example if the calling thread goes away
-// before the callback is executed, we want the ListValue to be destroyed.
-struct CONTENT_EXPORT FontListResult
- : public base::RefCountedThreadSafe<FontListResult> {
- FontListResult();
- ~FontListResult();
-
- scoped_ptr<base::ListValue> list;
-};
-
// Retrieves the list of fonts on the system as a list of strings. It provides
// a non-blocking interface to GetFontList_SlowBlocking in common/.
//
@@ -34,13 +22,9 @@
// the font list from the system can be slow. This function may be called from
// any thread that has a BrowserThread::ID. The callback will be executed on
// the calling thread.
-//
-// If the caller wants to take ownership of the ListValue, it can just do
-// FontListResult.list.release() or use scoped_ptr.swap() because this value
-// isn't used for anything else.
CONTENT_EXPORT void GetFontListAsync(
- const base::Callback<void(scoped_refptr<FontListResult>)>& callback);
+ const base::Callback<void(scoped_ptr<base::ListValue>)>& callback);
} // namespace content
-#endif // CONTENT_BROWSER_FONT_LIST_ASYNC_H_
+#endif // CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698