| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 // Worker for checking and setting the default browser. | 272 // Worker for checking and setting the default browser. |
| 273 class DefaultBrowserWorker : public DefaultWebClientWorker { | 273 class DefaultBrowserWorker : public DefaultWebClientWorker { |
| 274 public: | 274 public: |
| 275 explicit DefaultBrowserWorker(DefaultWebClientObserver* observer); | 275 explicit DefaultBrowserWorker(DefaultWebClientObserver* observer); |
| 276 | 276 |
| 277 private: | 277 private: |
| 278 virtual ~DefaultBrowserWorker() {} | 278 virtual ~DefaultBrowserWorker() {} |
| 279 | 279 |
| 280 // Check if Chrome is the default browser. | 280 // Check if Chrome is the default browser. |
| 281 virtual DefaultWebClientState CheckIsDefault() OVERRIDE; | 281 virtual DefaultWebClientState CheckIsDefault() override; |
| 282 | 282 |
| 283 // Set Chrome as the default browser. | 283 // Set Chrome as the default browser. |
| 284 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; | 284 virtual bool SetAsDefault(bool interactive_permitted) override; |
| 285 | 285 |
| 286 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker); | 286 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 // Worker for checking and setting the default client application | 289 // Worker for checking and setting the default client application |
| 290 // for a given protocol. A different worker instance is needed for each | 290 // for a given protocol. A different worker instance is needed for each |
| 291 // protocol you are interested in, so to check or set the default for | 291 // protocol you are interested in, so to check or set the default for |
| 292 // multiple protocols you should use multiple worker objects. | 292 // multiple protocols you should use multiple worker objects. |
| 293 class DefaultProtocolClientWorker : public DefaultWebClientWorker { | 293 class DefaultProtocolClientWorker : public DefaultWebClientWorker { |
| 294 public: | 294 public: |
| 295 DefaultProtocolClientWorker(DefaultWebClientObserver* observer, | 295 DefaultProtocolClientWorker(DefaultWebClientObserver* observer, |
| 296 const std::string& protocol); | 296 const std::string& protocol); |
| 297 | 297 |
| 298 const std::string& protocol() const { return protocol_; } | 298 const std::string& protocol() const { return protocol_; } |
| 299 | 299 |
| 300 protected: | 300 protected: |
| 301 virtual ~DefaultProtocolClientWorker() {} | 301 virtual ~DefaultProtocolClientWorker() {} |
| 302 | 302 |
| 303 private: | 303 private: |
| 304 // Check is Chrome is the default handler for this protocol. | 304 // Check is Chrome is the default handler for this protocol. |
| 305 virtual DefaultWebClientState CheckIsDefault() OVERRIDE; | 305 virtual DefaultWebClientState CheckIsDefault() override; |
| 306 | 306 |
| 307 // Set Chrome as the default handler for this protocol. | 307 // Set Chrome as the default handler for this protocol. |
| 308 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; | 308 virtual bool SetAsDefault(bool interactive_permitted) override; |
| 309 | 309 |
| 310 std::string protocol_; | 310 std::string protocol_; |
| 311 | 311 |
| 312 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); | 312 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); |
| 313 }; | 313 }; |
| 314 }; | 314 }; |
| 315 | 315 |
| 316 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ | 316 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ |
| OLD | NEW |