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

Unified Diff: chrome/browser/ui/webui/components_ui.h

Issue 209313002: Modified components ui to address concern of all the time disabled check update button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 6 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
Index: chrome/browser/ui/webui/components_ui.h
diff --git a/chrome/browser/ui/webui/components_ui.h b/chrome/browser/ui/webui/components_ui.h
index 2e98f211a2070adcbef2c7ba29035aa0626a19f1..5f6ddb2da9ed6813999dcd9ba4bf7d8e5248f009 100644
--- a/chrome/browser/ui/webui/components_ui.h
+++ b/chrome/browser/ui/webui/components_ui.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_WEBUI_COMPONENTS_UI_H_
#define CHROME_BROWSER_UI_WEBUI_COMPONENTS_UI_H_
+#include "chrome/browser/component_updater/component_updater_service.h"
+#include "chrome/browser/component_updater/crx_update_item.h"
#include "content/public/browser/web_ui_controller.h"
#include "ui/base/layout.h"
@@ -16,16 +18,26 @@ namespace user_prefs {
class PrefRegistrySyncable;
}
-class ComponentsUI : public content::WebUIController {
+class ComponentsUI : public content::WebUIController,
+ public component_updater::ServiceObserver {
public:
explicit ComponentsUI(content::WebUI* web_ui);
+ ~ComponentsUI();
static void OnDemandUpdate(const std::string& component_id);
+ static base::ListValue* LoadComponents();
+
static base::RefCountedMemory* GetFaviconResourceBytes(
ui::ScaleFactor scale_factor);
+ // Override from ServiceObserver
James Hawkins 2014/05/21 16:21:37 // ServiceObserver implementation. Per webui/ pre
Shrikant Kelkar 2014/05/23 03:49:23 Done.
+ virtual void OnEvent(Events event, const std::string& id) OVERRIDE;
+
private:
+ static std::string ComponentEventToString(Events event);
+ static std::string ServiceStatusToString(
+ component_updater::CrxUpdateItem::Status status);
DISALLOW_COPY_AND_ASSIGN(ComponentsUI);
};

Powered by Google App Engine
This is Rietveld 408576698