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"
11 class ApplicationImpl
;
14 namespace html_viewer
{
16 class HTMLFrameDelegate
{
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
31 virtual void OnFrameSwappedToRemote() = 0;
34 virtual ~HTMLFrameDelegate() {}
37 } // namespace html_viewer
39 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_