| 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 CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ | 5 #ifndef CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ |
| 6 #define CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ | 6 #define CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "content/public/renderer/render_frame_observer.h" | 11 #include "content/public/renderer/render_frame_observer.h" |
| 12 #include "content/public/renderer/render_frame_observer_tracker.h" | 12 #include "content/public/renderer/render_frame_observer_tracker.h" |
| 13 #include "mojo/public/cpp/system/core.h" | 13 #include "mojo/public/cpp/system/core.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class MojoContextState; | 17 class MojoContextState; |
| 18 | 18 |
| 19 enum class MojoBindingsType { FOR_WEB_UI, FOR_LAYOUT_TESTS, FOR_HEADLESS }; | 19 enum class MojoBindingsType { FOR_WEB_UI, FOR_LAYOUT_TESTS }; |
| 20 | 20 |
| 21 // MojoBindingsController is responsible for enabling the renderer side of mojo | 21 // MojoBindingsController is responsible for enabling the renderer side of mojo |
| 22 // bindings. It creates (and destroys) a MojoContextState at the appropriate | 22 // bindings. It creates (and destroys) a MojoContextState at the appropriate |
| 23 // times and handles the necessary browser messages. MojoBindingsController | 23 // times and handles the necessary browser messages. MojoBindingsController |
| 24 // destroys itself when the RendererFrame it is created with is destroyed. | 24 // destroys itself when the RendererFrame it is created with is destroyed. |
| 25 class MojoBindingsController | 25 class MojoBindingsController |
| 26 : public RenderFrameObserver, | 26 : public RenderFrameObserver, |
| 27 public RenderFrameObserverTracker<MojoBindingsController> { | 27 public RenderFrameObserverTracker<MojoBindingsController> { |
| 28 public: | 28 public: |
| 29 MojoBindingsController(RenderFrame* render_frame, | 29 MojoBindingsController(RenderFrame* render_frame, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 45 void OnDestruct() override; | 45 void OnDestruct() override; |
| 46 | 46 |
| 47 const MojoBindingsType bindings_type_; | 47 const MojoBindingsType bindings_type_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(MojoBindingsController); | 49 DISALLOW_COPY_AND_ASSIGN(MojoBindingsController); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace content | 52 } // namespace content |
| 53 | 53 |
| 54 #endif // CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ | 54 #endif // CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ |
| OLD | NEW |