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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/event_router.cc

Issue 2487623002: Notify Files App when ARC++ app is installed/removed (Closed)
Patch Set: Notify Files App when ARC++ app is installed/removed. Created 4 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/chromeos/extensions/file_manager/event_router.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
index 2b78461c5a07ff58cbacdfa590ab0b40537a8eae..832e0efae6fc3674425242077ab9c687903fc803 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -37,6 +37,7 @@
#include "chromeos/login/login_state.h"
#include "chromeos/network/network_handler.h"
#include "chromeos/network/network_state_handler.h"
+#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
Yusuke Sato 2016/11/17 02:29:54 nit: Remove. You can rely on the header file in th
oka 2016/11/21 07:02:15 Done.
#include "components/drive/chromeos/file_system_interface.h"
#include "components/drive/drive_pref_names.h"
#include "components/drive/file_change.h"
@@ -400,6 +401,14 @@ EventRouter::EventRouter(Profile* profile)
EventRouter::~EventRouter() {
}
+void EventRouter::OnAppsUpdated() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ BroadcastEvent(profile_,
+ extensions::events::FILE_MANAGER_PRIVATE_ON_APPS_UPDATED,
+ file_manager_private::OnAppsUpdated::kEventName,
+ file_manager_private::OnAppsUpdated::Create());
+}
+
void EventRouter::Shutdown() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this);
@@ -492,6 +501,10 @@ void EventRouter::ObserveEvents() {
pref_change_registrar_->Add(prefs::kUse24HourClock, callback);
chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
+
+ arc::ArcIntentHelperBridge* bridge = arc::ArcIntentHelperBridge::Get();
+ DCHECK(bridge);
kinaba 2016/11/17 01:47:19 When ARC is not enabled (either by config or when
Yusuke Sato 2016/11/17 02:29:54 Yeah, and you might have to retry later to avoid i
Yusuke Sato 2016/11/17 04:22:37 Sorry I misread your code. ArcIntentHelperBridge i
hidehiko 2016/11/17 07:34:19 I think no. In past, the launcher creation was gua
Yusuke Sato 2016/11/17 09:15:27 Got it, thanks for refreshing my memory.
+ bridge->AddObserver(this);
Yusuke Sato 2016/11/17 02:29:54 AddObserver should almost always be paired with Re
oka 2016/11/21 07:02:15 Done.
}
// File watch setup routines.

Powered by Google App Engine
This is Rietveld 408576698