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

Unified Diff: chrome/browser/ui/webui/options/font_settings_fonts_list_loader.h

Issue 7044012: Support getting the font list in Pepper. This currently only works out of (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « no previous file | chrome/browser/ui/webui/options/font_settings_fonts_list_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/font_settings_fonts_list_loader.h
===================================================================
--- chrome/browser/ui/webui/options/font_settings_fonts_list_loader.h (revision 85766)
+++ chrome/browser/ui/webui/options/font_settings_fonts_list_loader.h (working copy)
@@ -1,60 +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 CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_FONTS_LIST_LOADER_H_
-#define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_FONTS_LIST_LOADER_H_
-#pragma once
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-
-// This class allows asynchronous retrieval of the system fonts list. The
-// loading of the fonts is handled by a platform specific implementation, but
-// the retrieval is done on the File thread so that UI does not block for what
-// could be a long operation (if the user has a large number of fonts.)
-class FontSettingsFontsListLoader
- : public base::RefCountedThreadSafe<FontSettingsFontsListLoader> {
- public:
- // Any clients of this class must implement this observer interface in
- // order to be called back when the fonts list has been loaded.
- class Observer {
- public:
- virtual void FontsListHasLoaded() = 0;
-
- protected:
- virtual ~Observer() {}
- };
-
- // Pass in an observer, often 'this'.
- explicit FontSettingsFontsListLoader(Observer* observer);
-
- // Get the font list. This must only be called after receiveing the
- // FontsListHasLoaded() notification.
- ListValue* GetFontsList();
-
- // Start loading of the fonts list. The observer will be notified when this
- // operation has completed.
- void StartLoadFontsList();
-
- // Set the observer. This class does not take ownership of the observer.
- // The observer can be NULL.
- void SetObserver(Observer* observer);
-
- private:
- friend class base::RefCountedThreadSafe<FontSettingsFontsListLoader>;
-
- ~FontSettingsFontsListLoader();
-
- void GetFontsListOnFileThread();
- void FinishFontsListOnUIThread();
-
- scoped_ptr<ListValue> fonts_list_;
- Observer* observer_; // weak
-
- DISALLOW_COPY_AND_ASSIGN(FontSettingsFontsListLoader);
-};
-
-#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_FONTS_LIST_LOADER_H_
-
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/font_settings_fonts_list_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698