Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598
[chromium-blink-merge.git] / components / html_viewer / html_frame_delegate.h
blob35213396361e8f743d7cc4f9325b341dda6b72b2
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.
5 #ifndef COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_
6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_
8 #include "components/html_viewer/html_frame.h"
10 namespace mojo {
11 class ApplicationImpl;
14 namespace html_viewer {
16 class HTMLFrameDelegate {
17 public:
18 // Invoked when the Frame the delegate is attached to finishes loading. This
19 // is not invoked for any child frames, only the frame returned from
20 // HTMLFrameTreeManager::CreateFrameAndAttachToTree().
21 virtual void OnFrameDidFinishLoad() = 0;
23 // Returns the ApplicationImpl for the frame.
24 virtual mojo::ApplicationImpl* GetApp() = 0;
26 // Creates a new HTMLFrame. The delegate must return non-null.
27 virtual HTMLFrame* CreateHTMLFrame(HTMLFrame::CreateParams* params) = 0;
29 // Invoked when the HTMLFrame the delegate is associated with is swapped
30 // to a remote frame.
31 virtual void OnFrameSwappedToRemote() = 0;
33 protected:
34 virtual ~HTMLFrameDelegate() {}
37 } // namespace html_viewer
39 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_