| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_JS_INJECTION_READY_OBSERVER_H_ | 5 #ifndef CONTENT_TEST_JS_INJECTION_READY_OBSERVER_H_ |
| 6 #define CONTENT_TEST_JS_INJECTION_READY_OBSERVER_H_ | 6 #define CONTENT_TEST_JS_INJECTION_READY_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 namespace content { |
| 9 class RenderViewHost; | 10 class RenderViewHost; |
| 11 } |
| 10 | 12 |
| 11 // Interface to notify when JavaScript injection is possible. | 13 // Interface to notify when JavaScript injection is possible. |
| 12 class JsInjectionReadyObserver { | 14 class JsInjectionReadyObserver { |
| 13 public: | 15 public: |
| 14 // Called to indicate page entry committed and ready for JavaScript | 16 // Called to indicate page entry committed and ready for JavaScript |
| 15 // injection. |render_view_host| may be used to route injection messages to | 17 // injection. |render_view_host| may be used to route injection messages to |
| 16 // the appropriate RenderView. | 18 // the appropriate RenderView. |
| 17 virtual void OnJsInjectionReady(RenderViewHost* render_view_host) = 0; | 19 virtual void OnJsInjectionReady( |
| 20 content::RenderViewHost* render_view_host) = 0; |
| 18 | 21 |
| 19 protected: | 22 protected: |
| 20 virtual ~JsInjectionReadyObserver() {} | 23 virtual ~JsInjectionReadyObserver() {} |
| 21 }; | 24 }; |
| 22 | 25 |
| 23 #endif // CONTENT_TEST_JS_INJECTION_READY_OBSERVER_H_ | 26 #endif // CONTENT_TEST_JS_INJECTION_READY_OBSERVER_H_ |
| OLD | NEW |