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 SKY_VIEWER_CONTENT_HANDLER_H_ | 5 #ifndef SKY_VIEWER_CONTENT_HANDLER_H_ |
6 #define SKY_VIEWER_CONTENT_HANDLER_H_ | 6 #define SKY_VIEWER_CONTENT_HANDLER_H_ |
7 | 7 |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "mojo/public/interfaces/application/shell.mojom.h" | 9 #include "mojo/public/interfaces/application/shell.mojom.h" |
10 #include "mojo/services/public/interfaces/content_handler/content_handler.mojom.
h" | 10 #include "mojo/services/public/interfaces/content_handler/content_handler.mojom.
h" |
11 | 11 |
12 namespace sky { | 12 namespace sky { |
13 class DocumentView; | 13 class DocumentView; |
14 | 14 |
15 class ContentHandlerImpl : public mojo::InterfaceImpl<mojo::ContentHandler> { | 15 class ContentHandlerImpl : public mojo::InterfaceImpl<mojo::ContentHandler> { |
16 public: | 16 public: |
17 ContentHandlerImpl(mojo::Shell* shell, | 17 ContentHandlerImpl(scoped_refptr<base::MessageLoopProxy> compositor_thread); |
18 scoped_refptr<base::MessageLoopProxy> compositor_thread); | |
19 virtual ~ContentHandlerImpl(); | 18 virtual ~ContentHandlerImpl(); |
20 | 19 |
21 private: | 20 private: |
22 // Overridden from ContentHandler: | 21 // Overridden from ContentHandler: |
23 virtual void OnConnect( | 22 virtual void StartApplication(mojo::ShellPtr shell, |
24 const mojo::String& url, | 23 mojo::URLResponsePtr response) override; |
25 mojo::URLResponsePtr response, | |
26 mojo::InterfaceRequest<mojo::ServiceProvider> | |
27 servive_provider_request) override; | |
28 | 24 |
29 mojo::Shell* shell_; | |
30 scoped_refptr<base::MessageLoopProxy> compositor_thread_; | 25 scoped_refptr<base::MessageLoopProxy> compositor_thread_; |
31 | 26 |
32 DISALLOW_COPY_AND_ASSIGN(ContentHandlerImpl); | 27 DISALLOW_COPY_AND_ASSIGN(ContentHandlerImpl); |
33 }; | 28 }; |
34 | 29 |
35 } // namespace sky | 30 } // namespace sky |
36 | 31 |
37 #endif // SKY_VIEWER_DOCUMENT_VIEW_H_ | 32 #endif // SKY_VIEWER_DOCUMENT_VIEW_H_ |
OLD | NEW |