OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_IOS_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_IOS_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_IOS_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_IOS_CONTROLLER_H_ |
7 | 7 |
8 #import "ios/web/public/web_state/web_state.h" | 8 #import "ios/web/public/web_state/web_state.h" |
9 #include "ios/web/public/webui/web_ui_ios.h" | 9 #include "ios/web/public/webui/web_ui_ios.h" |
10 #include "ios/web/public/webui/web_ui_ios_controller.h" | 10 #include "ios/web/public/webui/web_ui_ios_controller.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 : web::WebUIIOSController(web_ui) { | 27 : web::WebUIIOSController(web_ui) { |
28 web_ui->GetWebState()->GetMojoInterfaceRegistry()->AddInterface(this); | 28 web_ui->GetWebState()->GetMojoInterfaceRegistry()->AddInterface(this); |
29 } | 29 } |
30 | 30 |
31 protected: | 31 protected: |
32 // Invoked to create the specific bindings implementation. | 32 // Invoked to create the specific bindings implementation. |
33 virtual void BindUIHandler(mojo::InterfaceRequest<Interface> request) = 0; | 33 virtual void BindUIHandler(mojo::InterfaceRequest<Interface> request) = 0; |
34 | 34 |
35 private: | 35 private: |
36 // shell::InterfaceFactory overrides: | 36 // shell::InterfaceFactory overrides: |
37 void Create(shell::Connection*, | 37 void Create(const shell::Identity& remote_identity, |
38 mojo::InterfaceRequest<Interface> request) override { | 38 mojo::InterfaceRequest<Interface> request) override { |
39 BindUIHandler(std::move(request)); | 39 BindUIHandler(std::move(request)); |
40 } | 40 } |
41 | 41 |
42 private: | 42 private: |
43 DISALLOW_COPY_AND_ASSIGN(MojoWebUIIOSController); | 43 DISALLOW_COPY_AND_ASSIGN(MojoWebUIIOSController); |
44 }; | 44 }; |
45 | 45 |
46 #endif // IOS_CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_IOS_CONTROLLER_H_ | 46 #endif // IOS_CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_IOS_CONTROLLER_H_ |
OLD | NEW |