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_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ |
6 #define CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ | 6 #define CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 net::URLRequest* request) const; | 33 net::URLRequest* request) const; |
34 | 34 |
35 // Determines if the requested document can be viewed by the Google | 35 // Determines if the requested document can be viewed by the Google |
36 // Document Viewer. If it can, returns a net::URLRequestJob that | 36 // Document Viewer. If it can, returns a net::URLRequestJob that |
37 // redirects the browser to the view URL. | 37 // redirects the browser to the view URL. |
38 virtual net::URLRequestJob* MaybeInterceptResponse( | 38 virtual net::URLRequestJob* MaybeInterceptResponse( |
39 net::URLRequest* request) const; | 39 net::URLRequest* request) const; |
40 | 40 |
41 private: | 41 private: |
42 bool ShouldUsePdfPlugin(net::URLRequest* request) const; | 42 bool ShouldUsePdfPlugin(net::URLRequest* request) const; |
| 43 bool ShouldInterceptScheme(const std::string& scheme) const; |
43 | 44 |
44 // The list of supported mime types. | 45 // The list of supported mime types. |
45 base::hash_set<std::string> supported_mime_types_; | 46 base::hash_set<std::string> supported_mime_types_; |
46 }; | 47 }; |
47 | 48 |
48 } // namespace chromeos | 49 } // namespace chromeos |
49 | 50 |
50 #endif // CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ | 51 #endif // CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ |
OLD | NEW |