1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_APP_LIST_LAUNCHER_PAGE_EVENT_DISPATCHER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_LAUNCHER_PAGE_EVENT_DISPATCHER_H_
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "extensions/browser/event_router.h"
13 #include "extensions/browser/extension_event_histogram_value.h"
23 // A class which sends API events to the custom launcher page.
24 class LauncherPageEventDispatcher
{
26 LauncherPageEventDispatcher(Profile
* profile
,
27 const std::string
& extension_id
);
28 ~LauncherPageEventDispatcher();
30 void ProgressChanged(double progress
);
34 // Dispatches |event| to |extension_id_|.
35 void DispatchEvent(scoped_ptr
<extensions::Event
> event
);
38 std::string extension_id_
;
40 DISALLOW_COPY_AND_ASSIGN(LauncherPageEventDispatcher
);
43 } // namespace app_list
45 #endif // CHROME_BROWSER_UI_APP_LIST_LAUNCHER_PAGE_EVENT_DISPATCHER_H_