| 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_SHELL_INTEGRATION_H_ | 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ |
| 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ | 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 // Worker for checking and setting the default browser. | 236 // Worker for checking and setting the default browser. |
| 237 class DefaultBrowserWorker : public DefaultWebClientWorker { | 237 class DefaultBrowserWorker : public DefaultWebClientWorker { |
| 238 public: | 238 public: |
| 239 explicit DefaultBrowserWorker(DefaultWebClientObserver* observer); | 239 explicit DefaultBrowserWorker(DefaultWebClientObserver* observer); |
| 240 | 240 |
| 241 private: | 241 private: |
| 242 virtual ~DefaultBrowserWorker() {} | 242 virtual ~DefaultBrowserWorker() {} |
| 243 | 243 |
| 244 // Check if Chrome is the default browser. | 244 // Check if Chrome is the default browser. |
| 245 virtual DefaultWebClientState CheckIsDefault(); | 245 virtual DefaultWebClientState CheckIsDefault() OVERRIDE; |
| 246 | 246 |
| 247 // Set Chrome as the default browser. | 247 // Set Chrome as the default browser. |
| 248 virtual void SetAsDefault(); | 248 virtual void SetAsDefault() OVERRIDE; |
| 249 | 249 |
| 250 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker); | 250 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker); |
| 251 }; | 251 }; |
| 252 | 252 |
| 253 // Worker for checking and setting the default client application | 253 // Worker for checking and setting the default client application |
| 254 // for a given protocol. A different worker instance is needed for each | 254 // for a given protocol. A different worker instance is needed for each |
| 255 // protocol you are interested in, so to check or set the default for | 255 // protocol you are interested in, so to check or set the default for |
| 256 // multiple protocols you should use multiple worker objects. | 256 // multiple protocols you should use multiple worker objects. |
| 257 class DefaultProtocolClientWorker : public DefaultWebClientWorker { | 257 class DefaultProtocolClientWorker : public DefaultWebClientWorker { |
| 258 public: | 258 public: |
| 259 DefaultProtocolClientWorker(DefaultWebClientObserver* observer, | 259 DefaultProtocolClientWorker(DefaultWebClientObserver* observer, |
| 260 const std::string& protocol); | 260 const std::string& protocol); |
| 261 | 261 |
| 262 const std::string& protocol() const { return protocol_; } | 262 const std::string& protocol() const { return protocol_; } |
| 263 | 263 |
| 264 protected: | 264 protected: |
| 265 virtual ~DefaultProtocolClientWorker() {} | 265 virtual ~DefaultProtocolClientWorker() {} |
| 266 | 266 |
| 267 private: | 267 private: |
| 268 // Check is Chrome is the default handler for this protocol. | 268 // Check is Chrome is the default handler for this protocol. |
| 269 virtual DefaultWebClientState CheckIsDefault(); | 269 virtual DefaultWebClientState CheckIsDefault() OVERRIDE; |
| 270 | 270 |
| 271 // Set Chrome as the default handler for this protocol. | 271 // Set Chrome as the default handler for this protocol. |
| 272 virtual void SetAsDefault(); | 272 virtual void SetAsDefault() OVERRIDE; |
| 273 | 273 |
| 274 std::string protocol_; | 274 std::string protocol_; |
| 275 | 275 |
| 276 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 276 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); |
| 277 }; | 277 }; |
| 278 }; | 278 }; |
| 279 | 279 |
| 280 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 280 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ |
| OLD | NEW |