| 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 #ifndef IOS_WEB_SHELL_SHELL_WEB_CLIENT_H_ | 5 #ifndef IOS_WEB_SHELL_SHELL_WEB_CLIENT_H_ |
| 6 #define IOS_WEB_SHELL_SHELL_WEB_CLIENT_H_ | 6 #define IOS_WEB_SHELL_SHELL_WEB_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "ios/web/public/web_client.h" | 12 #include "ios/web/public/web_client.h" |
| 12 | 13 |
| 13 namespace web { | 14 namespace web { |
| 14 class ShellBrowserState; | 15 class ShellBrowserState; |
| 15 class ShellWebMainParts; | 16 class ShellWebMainParts; |
| 16 | 17 |
| 17 class ShellWebClient : public WebClient { | 18 class ShellWebClient : public WebClient { |
| 18 public: | 19 public: |
| 19 ShellWebClient(); | 20 ShellWebClient(); |
| 20 ~ShellWebClient() override; | 21 ~ShellWebClient() override; |
| 21 | 22 |
| 22 // WebClient implementation. | 23 // WebClient implementation. |
| 23 WebMainParts* CreateWebMainParts() override; | 24 WebMainParts* CreateWebMainParts() override; |
| 24 std::string GetProduct() const override; | 25 std::string GetProduct() const override; |
| 25 std::string GetUserAgent(bool desktop_user_agent) const override; | 26 std::string GetUserAgent(bool desktop_user_agent) const override; |
| 26 | 27 |
| 27 ShellBrowserState* browser_state() const; | 28 ShellBrowserState* browser_state() const; |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 scoped_ptr<ShellWebMainParts> web_main_parts_; | 31 std::unique_ptr<ShellWebMainParts> web_main_parts_; |
| 31 | 32 |
| 32 DISALLOW_COPY_AND_ASSIGN(ShellWebClient); | 33 DISALLOW_COPY_AND_ASSIGN(ShellWebClient); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace web | 36 } // namespace web |
| 36 | 37 |
| 37 #endif // IOS_WEB_SHELL_SHELL_WEB_CLIENT_H_ | 38 #endif // IOS_WEB_SHELL_SHELL_WEB_CLIENT_H_ |
| OLD | NEW |