| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_FILE_SELECT_HELPER_H_ | 5 #ifndef CHROME_BROWSER_FILE_SELECT_HELPER_H_ |
| 6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_ | 6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Utility class which can listen for directory lister events and relay | 48 // Utility class which can listen for directory lister events and relay |
| 49 // them to the main object with the correct tracking id. | 49 // them to the main object with the correct tracking id. |
| 50 class DirectoryListerDispatchDelegate | 50 class DirectoryListerDispatchDelegate |
| 51 : public net::DirectoryLister::DirectoryListerDelegate { | 51 : public net::DirectoryLister::DirectoryListerDelegate { |
| 52 public: | 52 public: |
| 53 DirectoryListerDispatchDelegate(FileSelectHelper* parent, int id) | 53 DirectoryListerDispatchDelegate(FileSelectHelper* parent, int id) |
| 54 : parent_(parent), | 54 : parent_(parent), |
| 55 id_(id) {} | 55 id_(id) {} |
| 56 virtual ~DirectoryListerDispatchDelegate() {} | 56 virtual ~DirectoryListerDispatchDelegate() {} |
| 57 virtual void OnListFile( | 57 virtual void OnListFile( |
| 58 const net::DirectoryLister::DirectoryListerData& data) { | 58 const net::DirectoryLister::DirectoryListerData& data) OVERRIDE { |
| 59 parent_->OnListFile(id_, data); | 59 parent_->OnListFile(id_, data); |
| 60 } | 60 } |
| 61 virtual void OnListDone(int error) { | 61 virtual void OnListDone(int error) OVERRIDE { |
| 62 parent_->OnListDone(id_, error); | 62 parent_->OnListDone(id_, error); |
| 63 } | 63 } |
| 64 private: | 64 private: |
| 65 // This FileSelectHelper owns this object. | 65 // This FileSelectHelper owns this object. |
| 66 FileSelectHelper* parent_; | 66 FileSelectHelper* parent_; |
| 67 int id_; | 67 int id_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(DirectoryListerDispatchDelegate); | 69 DISALLOW_COPY_AND_ASSIGN(DirectoryListerDispatchDelegate); |
| 70 }; | 70 }; |
| 71 | 71 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 struct ActiveDirectoryEnumeration; | 133 struct ActiveDirectoryEnumeration; |
| 134 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_; | 134 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_; |
| 135 | 135 |
| 136 // Registrar for notifications regarding our RenderViewHost. | 136 // Registrar for notifications regarding our RenderViewHost. |
| 137 content::NotificationRegistrar notification_registrar_; | 137 content::NotificationRegistrar notification_registrar_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper); | 139 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_ | 142 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_ |
| OLD | NEW |