[Sync] Fix double-tapping signin on Android.
[chromium-blink-merge.git] / components / html_viewer / html_frame_delegate.h
blobc55f1089f16ea0c46dd838c06db5d2c07f499b85
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 // TODO(yzshen): Remove this check once the browser is able to navigate an
19 // existing html_viewer instance and about:blank page support is ready.
20 virtual bool ShouldNavigateLocallyInMainFrame() = 0;
22 // Invoked when the Frame the delegate is attached to finishes loading. This
23 // is not invoked for any child frames, only the frame returned from
24 // HTMLFrameTreeManager::CreateFrameAndAttachToTree().
25 virtual void OnFrameDidFinishLoad() = 0;
27 // Returns the ApplicationImpl for the frame.
28 virtual mojo::ApplicationImpl* GetApp() = 0;
30 // Creates a new HTMLFrame. The delegate must return non-null.
31 virtual HTMLFrame* CreateHTMLFrame(HTMLFrame::CreateParams* params) = 0;
33 protected:
34 virtual ~HTMLFrameDelegate() {}
37 } // namespace html_viewer
39 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_