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/chromeos/extensions/file_manager/event_router.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 880 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
881 // Do nothing. | 881 // Do nothing. |
882 } | 882 } |
883 | 883 |
884 void EventRouter::OnDeviceRemoved(const std::string& device_path) { | 884 void EventRouter::OnDeviceRemoved(const std::string& device_path) { |
885 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 885 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
886 // Do nothing. | 886 // Do nothing. |
887 } | 887 } |
888 | 888 |
889 void EventRouter::OnVolumeMounted(chromeos::MountError error_code, | 889 void EventRouter::OnVolumeMounted(chromeos::MountError error_code, |
890 const VolumeInfo& volume_info, | 890 const VolumeInfo& volume_info) { |
891 bool is_remounting) { | |
892 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 891 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
893 // profile_ is NULL if ShutdownOnUIThread() is called earlier. This can | 892 // profile_ is NULL if ShutdownOnUIThread() is called earlier. This can |
894 // happen at shutdown. This should be removed after removing Drive mounting | 893 // happen at shutdown. This should be removed after removing Drive mounting |
895 // code in addMount. (addMount -> OnFileSystemMounted -> OnVolumeMounted is | 894 // code in addMount. (addMount -> OnFileSystemMounted -> OnVolumeMounted is |
896 // the only path to come here after Shutdown is called). | 895 // the only path to come here after Shutdown is called). |
897 if (!profile_) | 896 if (!profile_) |
898 return; | 897 return; |
899 | 898 |
900 DispatchMountCompletedEvent( | 899 DispatchMountCompletedEvent( |
901 file_browser_private::MOUNT_COMPLETED_EVENT_TYPE_MOUNT, | 900 file_browser_private::MOUNT_COMPLETED_EVENT_TYPE_MOUNT, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 } | 965 } |
967 } | 966 } |
968 | 967 |
969 void EventRouter::OnOwnerEntryChanged(aura::Window* window) { | 968 void EventRouter::OnOwnerEntryChanged(aura::Window* window) { |
970 BroadcastEvent(profile_, | 969 BroadcastEvent(profile_, |
971 file_browser_private::OnDesktopChanged::kEventName, | 970 file_browser_private::OnDesktopChanged::kEventName, |
972 file_browser_private::OnDesktopChanged::Create()); | 971 file_browser_private::OnDesktopChanged::Create()); |
973 } | 972 } |
974 | 973 |
975 } // namespace file_manager | 974 } // namespace file_manager |
OLD | NEW |