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/webui/chromeos/provided_file_systems_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/provided_file_systems_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 : public content::WebUIMessageHandler, | 132 : public content::WebUIMessageHandler, |
133 public file_system_provider::RequestManager::Observer { | 133 public file_system_provider::RequestManager::Observer { |
134 public: | 134 public: |
135 ProvidedFileSystemsWebUIHandler() : weak_ptr_factory_(this) {} | 135 ProvidedFileSystemsWebUIHandler() : weak_ptr_factory_(this) {} |
136 | 136 |
137 virtual ~ProvidedFileSystemsWebUIHandler(); | 137 virtual ~ProvidedFileSystemsWebUIHandler(); |
138 | 138 |
139 // RequestManager::Observer overrides. | 139 // RequestManager::Observer overrides. |
140 virtual void OnRequestCreated( | 140 virtual void OnRequestCreated( |
141 int request_id, | 141 int request_id, |
142 file_system_provider::RequestType type) OVERRIDE; | 142 file_system_provider::RequestType type) override; |
143 virtual void OnRequestDestroyed(int request_id) OVERRIDE; | 143 virtual void OnRequestDestroyed(int request_id) override; |
144 virtual void OnRequestExecuted(int request_id) OVERRIDE; | 144 virtual void OnRequestExecuted(int request_id) override; |
145 virtual void OnRequestFulfilled( | 145 virtual void OnRequestFulfilled( |
146 int request_id, | 146 int request_id, |
147 const file_system_provider::RequestValue& result, | 147 const file_system_provider::RequestValue& result, |
148 bool has_more) OVERRIDE; | 148 bool has_more) override; |
149 virtual void OnRequestRejected( | 149 virtual void OnRequestRejected( |
150 int request_id, | 150 int request_id, |
151 const file_system_provider::RequestValue& result, | 151 const file_system_provider::RequestValue& result, |
152 base::File::Error error) OVERRIDE; | 152 base::File::Error error) override; |
153 virtual void OnRequestTimeouted(int request_id) OVERRIDE; | 153 virtual void OnRequestTimeouted(int request_id) override; |
154 | 154 |
155 private: | 155 private: |
156 // content::WebUIMessageHandler overrides. | 156 // content::WebUIMessageHandler overrides. |
157 virtual void RegisterMessages() OVERRIDE; | 157 virtual void RegisterMessages() override; |
158 | 158 |
159 // Gets a file system provider service for the current profile. If not found, | 159 // Gets a file system provider service for the current profile. If not found, |
160 // then NULL. | 160 // then NULL. |
161 file_system_provider::Service* GetService(); | 161 file_system_provider::Service* GetService(); |
162 | 162 |
163 // Invoked when updating file system list is requested. | 163 // Invoked when updating file system list is requested. |
164 void UpdateFileSystems(const base::ListValue* args); | 164 void UpdateFileSystems(const base::ListValue* args); |
165 | 165 |
166 // Invoked when a file system is selected from the list. | 166 // Invoked when a file system is selected from the list. |
167 void SelectFileSystem(const base::ListValue* args); | 167 void SelectFileSystem(const base::ListValue* args); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 IDR_PROVIDED_FILE_SYSTEMS_CSS); | 358 IDR_PROVIDED_FILE_SYSTEMS_CSS); |
359 source->AddResourcePath("provided_file_systems.js", | 359 source->AddResourcePath("provided_file_systems.js", |
360 IDR_PROVIDED_FILE_SYSTEMS_JS); | 360 IDR_PROVIDED_FILE_SYSTEMS_JS); |
361 source->SetDefaultResource(IDR_PROVIDED_FILE_SYSTEMS_HTML); | 361 source->SetDefaultResource(IDR_PROVIDED_FILE_SYSTEMS_HTML); |
362 | 362 |
363 Profile* profile = Profile::FromWebUI(web_ui); | 363 Profile* profile = Profile::FromWebUI(web_ui); |
364 content::WebUIDataSource::Add(profile, source); | 364 content::WebUIDataSource::Add(profile, source); |
365 } | 365 } |
366 | 366 |
367 } // namespace chromeos | 367 } // namespace chromeos |
OLD | NEW |