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

Unified Diff: chrome/browser/ui/webui/ntp/favicon_webui_handler.h

Issue 7031078: Retry r88137: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for test failures Created 9 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: chrome/browser/ui/webui/ntp/favicon_webui_handler.h
diff --git a/chrome/browser/ui/webui/ntp/favicon_webui_handler.h b/chrome/browser/ui/webui/ntp/favicon_webui_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..557cb968eca542d46cbb2d69b95718359c5581e7
--- /dev/null
+++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.h
@@ -0,0 +1,44 @@
+// 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_NTP_FAVICON_WEBUI_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_NTP_FAVICON_WEBUI_HANDLER_H_
+#pragma once
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "chrome/browser/favicon/favicon_service.h"
+#include "content/browser/webui/web_ui.h"
+
+class GURL;
+class ListValue;
+class Profile;
+
+class FaviconWebUIHandler : public WebUIMessageHandler {
+ public:
+ FaviconWebUIHandler();
+ virtual ~FaviconWebUIHandler();
+
+ // WebUIMessageHandler
+ virtual void RegisterMessages();
+
+ void HandleGetFaviconDominantColor(const ListValue* args);
+
+ private:
+ // Called when favicon data is available from the history backend.
+ void OnFaviconDataAvailable(FaviconService::Handle request_handle,
+ history::FaviconData favicon);
+
+ CancelableRequestConsumerTSimple<int> consumer_;
+
+ // Raw PNG representation of the favicon to show when the favicon
+ // database doesn't have a favicon for a webpage.
+ scoped_refptr<RefCountedMemory> default_favicon_;
+
+ DISALLOW_COPY_AND_ASSIGN(FaviconWebUIHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_NTP_FAVICON_WEBUI_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698