Files.app: Use Roboto medium for drive banner.
[chromium-blink-merge.git] / mandoline / tab / frame_tree_delegate.h
blob6562bd8ad5850a278cd97fee6afd12f7c3083490
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"
11 namespace mandoline {
13 class Frame;
14 class MessageEvent;
16 class FrameTreeDelegate {
17 public:
18 virtual bool CanPostMessageEventToFrame(const Frame* source,
19 const Frame* target,
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,
30 Frame* target_frame,
31 mojo::URLRequestPtr request) = 0;
33 protected:
34 virtual ~FrameTreeDelegate() {}
37 } // namespace mandoline
39 #endif // MANDOLINE_TAB_FRAME_TREE_DELEGATE_H_