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 MANDOLINE_TAB_FRAME_TREE_DELEGATE_H_
6 #define MANDOLINE_TAB_FRAME_TREE_DELEGATE_H_
8 #include "mandoline/tab/public/interfaces/frame_tree.mojom.h"
9 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
16 class FrameTreeDelegate
{
18 virtual bool CanPostMessageEventToFrame(const Frame
* source
,
20 MessageEvent
* event
) = 0;
21 virtual void LoadingStateChanged(bool loading
) = 0;
22 virtual void ProgressChanged(double progress
) = 0;
24 // |source| is requesting a navigation. If |target_type| is
25 // |EXISTING_FRAME| then |target_frame| identifies the frame to perform the
26 // navigation in, otherwise |target_frame| is not used. |target_frame| may
27 // be null, even for |EXISTING_FRAME|.
28 virtual void RequestNavigate(Frame
* source
,
29 NavigationTargetType target_type
,
31 mojo::URLRequestPtr request
) = 0;
34 virtual ~FrameTreeDelegate() {}
37 } // namespace mandoline
39 #endif // MANDOLINE_TAB_FRAME_TREE_DELEGATE_H_