| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_ | |
| 6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_ | |
| 7 | |
| 8 namespace mojo { | |
| 9 class Shell; | |
| 10 } | |
| 11 | |
| 12 namespace html_viewer { | |
| 13 | |
| 14 class HTMLFactory; | |
| 15 class HTMLFrame; | |
| 16 | |
| 17 class HTMLFrameDelegate { | |
| 18 public: | |
| 19 // Returns the Shell for the frame. | |
| 20 virtual mojo::Shell* GetShell() = 0; | |
| 21 | |
| 22 // Returns the factory for creating various classes. | |
| 23 virtual HTMLFactory* GetHTMLFactory() = 0; | |
| 24 | |
| 25 // Invoked when the Frame the delegate is attached to finishes loading. This | |
| 26 // is not invoked for any child frames, only the frame returned from | |
| 27 // HTMLFrameTreeManager::CreateFrameAndAttachToTree(). | |
| 28 virtual void OnFrameDidFinishLoad() = 0; | |
| 29 | |
| 30 // Invoked when the HTMLFrame the delegate is associated with is swapped | |
| 31 // to a remote frame. | |
| 32 virtual void OnFrameSwappedToRemote() = 0; | |
| 33 | |
| 34 // Invoked when this delegate is to take over from |old_delegate| (which may | |
| 35 // be null). This is invoked when a new connection is established and we | |
| 36 // are already rendering to the supplied frame. | |
| 37 virtual void OnSwap(HTMLFrame* frame, HTMLFrameDelegate* old_delegate) = 0; | |
| 38 | |
| 39 // Invoked when the HTMLFrame is destroyed. | |
| 40 virtual void OnFrameDestroyed() = 0; | |
| 41 | |
| 42 protected: | |
| 43 virtual ~HTMLFrameDelegate() {} | |
| 44 }; | |
| 45 | |
| 46 } // namespace html_viewer | |
| 47 | |
| 48 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_ | |
| OLD | NEW |