OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/app_list/launcher_page_event_dispatcher.h" | 5 #include "chrome/browser/ui/app_list/launcher_page_event_dispatcher.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/values.h" | 9 #include "base/values.h" |
8 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/common/extensions/api/launcher_page.h" | 11 #include "chrome/common/extensions/api/launcher_page.h" |
10 #include "extensions/browser/event_router.h" | 12 #include "extensions/browser/event_router.h" |
11 | 13 |
12 namespace OnTransitionChanged = | 14 namespace OnTransitionChanged = |
13 extensions::api::launcher_page::OnTransitionChanged; | 15 extensions::api::launcher_page::OnTransitionChanged; |
14 namespace OnPopSubpage = extensions::api::launcher_page::OnPopSubpage; | 16 namespace OnPopSubpage = extensions::api::launcher_page::OnPopSubpage; |
15 | 17 |
16 namespace app_list { | 18 namespace app_list { |
(...skipping 15 matching lines...) Expand all Loading... |
32 | 34 |
33 void LauncherPageEventDispatcher::PopSubpage() { | 35 void LauncherPageEventDispatcher::PopSubpage() { |
34 DispatchEvent(make_scoped_ptr( | 36 DispatchEvent(make_scoped_ptr( |
35 new extensions::Event(extensions::events::LAUNCHER_PAGE_ON_POP_SUBPAGE, | 37 new extensions::Event(extensions::events::LAUNCHER_PAGE_ON_POP_SUBPAGE, |
36 OnPopSubpage::kEventName, OnPopSubpage::Create()))); | 38 OnPopSubpage::kEventName, OnPopSubpage::Create()))); |
37 } | 39 } |
38 | 40 |
39 void LauncherPageEventDispatcher::DispatchEvent( | 41 void LauncherPageEventDispatcher::DispatchEvent( |
40 scoped_ptr<extensions::Event> event) { | 42 scoped_ptr<extensions::Event> event) { |
41 extensions::EventRouter::Get(profile_) | 43 extensions::EventRouter::Get(profile_) |
42 ->DispatchEventToExtension(extension_id_, event.Pass()); | 44 ->DispatchEventToExtension(extension_id_, std::move(event)); |
43 } | 45 } |
44 | 46 |
45 } // namespace app_list | 47 } // namespace app_list |
OLD | NEW |