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

Unified Diff: chrome/browser/ui/app_list/launcher_page_event_dispatcher.h

Issue 683703002: Notify launcher page with onTransitionChanged event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_page_api_show_state_notify
Patch Set: fix mac compile Created 6 years, 1 month 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/app_list/launcher_page_event_dispatcher.h
diff --git a/chrome/browser/ui/app_list/launcher_page_event_dispatcher.h b/chrome/browser/ui/app_list/launcher_page_event_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..e6892ba20aedd824d15b7b0eb79177df37ce71d5
--- /dev/null
+++ b/chrome/browser/ui/app_list/launcher_page_event_dispatcher.h
@@ -0,0 +1,42 @@
+// Copyright 2014 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_APP_LIST_LAUNCHER_PAGE_EVENT_DISPATCHER_H_
+#define CHROME_BROWSER_UI_APP_LIST_LAUNCHER_PAGE_EVENT_DISPATCHER_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+
+class Profile;
+
+namespace base {
+class ListValue;
+}
+
+namespace app_list {
+
+// A class which sends API events to the custom launcher page.
+class LauncherPageEventDispatcher {
+ public:
+ LauncherPageEventDispatcher(Profile* profile,
+ const std::string& extension_id);
+ ~LauncherPageEventDispatcher();
+
+ void ProgressChanged(double progress);
+
+ private:
+ void SendEventToLauncherPage(const std::string& event_name,
+ scoped_ptr<base::ListValue> args);
+
+ Profile* profile_;
+ std::string extension_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(LauncherPageEventDispatcher);
+};
+
+} // namespace app_list
+
+#endif // CHROME_BROWSER_UI_APP_LIST_LAUNCHER_PAGE_EVENT_DISPATCHER_H_
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.cc ('k') | chrome/browser/ui/app_list/launcher_page_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698