| OLD | NEW |
| 1 // Copyright (c) 2010 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_REMOTING_REMOTING_RESOURCES_SOURCE_H_ |
| 6 #define CHROME_BROWSER_REMOTING_REMOTING_RESOURCES_SOURCE_H_ |
| 7 |
| 5 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 6 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 9 #include "chrome/browser/webui/chrome_url_data_manager.h" |
| 7 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 8 | 11 |
| 9 class RemotingResourcesSource : public ChromeURLDataManager::DataSource { | 12 class RemotingResourcesSource : public ChromeURLDataManager::DataSource { |
| 10 public: | 13 public: |
| 11 RemotingResourcesSource(); | 14 RemotingResourcesSource(); |
| 12 virtual void StartDataRequest(const std::string& path, | 15 virtual void StartDataRequest(const std::string& path, |
| 13 bool is_off_the_record, | 16 bool is_off_the_record, |
| 14 int request_id); | 17 int request_id); |
| 15 | 18 |
| 16 virtual std::string GetMimeType(const std::string& path) const; | 19 virtual std::string GetMimeType(const std::string& path) const; |
| 17 | 20 |
| 18 static const char kInvalidPasswordHelpUrl[]; | 21 static const char kInvalidPasswordHelpUrl[]; |
| 19 static const char kCanNotAccessAccountUrl[]; | 22 static const char kCanNotAccessAccountUrl[]; |
| 20 static const char kCreateNewAccountUrl[]; | 23 static const char kCreateNewAccountUrl[]; |
| 21 | 24 |
| 22 private: | 25 private: |
| 23 virtual ~RemotingResourcesSource() {} | 26 virtual ~RemotingResourcesSource() {} |
| 24 | 27 |
| 25 // Takes a string containing an URL and returns an URL containing a CGI | 28 // Takes a string containing an URL and returns an URL containing a CGI |
| 26 // parameter of the form "&hl=xy" where 'xy' is the language code of the | 29 // parameter of the form "&hl=xy" where 'xy' is the language code of the |
| 27 // current locale. | 30 // current locale. |
| 28 std::string GetLocalizedUrl(const std::string& url) const; | 31 std::string GetLocalizedUrl(const std::string& url) const; |
| 29 | 32 |
| 30 DISALLOW_COPY_AND_ASSIGN(RemotingResourcesSource); | 33 DISALLOW_COPY_AND_ASSIGN(RemotingResourcesSource); |
| 31 }; | 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_REMOTING_REMOTING_RESOURCES_SOURCE_H_ |
| OLD | NEW |