| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // By default, observers will be deleted when the RenderFrame goes away. If | 32 // By default, observers will be deleted when the RenderFrame goes away. If |
| 33 // they want to outlive it, they can override this function. | 33 // they want to outlive it, they can override this function. |
| 34 virtual void OnDestruct(); | 34 virtual void OnDestruct(); |
| 35 | 35 |
| 36 // Called when a Pepper plugin is created. | 36 // Called when a Pepper plugin is created. |
| 37 virtual void DidCreatePepperPlugin(RendererPpapiHost* host) {} | 37 virtual void DidCreatePepperPlugin(RendererPpapiHost* host) {} |
| 38 | 38 |
| 39 // Called when a load is explicitly stopped by the user or browser. | 39 // Called when a load is explicitly stopped by the user or browser. |
| 40 virtual void OnStop() {} | 40 virtual void OnStop() {} |
| 41 | 41 |
| 42 // Called when the RenderFrame visiblity is changed. |
| 43 virtual void WasHidden() {} |
| 44 virtual void WasShown() {} |
| 45 |
| 42 // These match the Blink API notifications | 46 // These match the Blink API notifications |
| 43 virtual void DidCommitProvisionalLoad(bool is_new_navigation) {} | 47 virtual void DidCommitProvisionalLoad(bool is_new_navigation) {} |
| 44 virtual void DidStartProvisionalLoad() {} | 48 virtual void DidStartProvisionalLoad() {} |
| 45 virtual void DidFailProvisionalLoad(const blink::WebURLError& error) {} | 49 virtual void DidFailProvisionalLoad(const blink::WebURLError& error) {} |
| 46 virtual void DidFinishLoad() {} | 50 virtual void DidFinishLoad() {} |
| 47 virtual void DidFinishDocumentLoad() {} | 51 virtual void DidFinishDocumentLoad() {} |
| 48 virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context, | 52 virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context, |
| 49 int world_id) {} | 53 int world_id) {} |
| 50 virtual void DidClearWindowObject() {} | 54 virtual void DidClearWindowObject() {} |
| 51 virtual void DidChangeName(const base::string16& name) {} | 55 virtual void DidChangeName(const base::string16& name) {} |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 RenderFrame* render_frame_; | 89 RenderFrame* render_frame_; |
| 86 // The routing ID of the associated RenderFrame. | 90 // The routing ID of the associated RenderFrame. |
| 87 int routing_id_; | 91 int routing_id_; |
| 88 | 92 |
| 89 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); | 93 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 } // namespace content | 96 } // namespace content |
| 93 | 97 |
| 94 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ | 98 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ |
| OLD | NEW |