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_FRAME_TREE_MANAGER_H_
6 #define COMPONENTS_HTML_VIEWER_FRAME_TREE_MANAGER_H_
8 #include "base/basictypes.h"
9 #include "mandoline/tab/public/interfaces/frame_tree.mojom.h"
11 namespace html_viewer
{
13 // FrameTreeManager is the FrameTreeClient implementation for an HTMLDocument.
14 // It keeps the blink frame tree in sync with that of the FrameTreeServer.
15 // TODO(sky): make it actually do this.
16 class FrameTreeManager
: public mandoline::FrameTreeClient
{
19 ~FrameTreeManager() override
;
22 // mandoline::FrameTreeClient:
23 void OnConnect(mandoline::FrameTreeServerPtr server
,
24 mojo::Array
<mandoline::FrameDataPtr
> frames
) override
;
25 void OnFrameAdded(mandoline::FrameDataPtr frame
) override
;
26 void OnFrameRemoved(uint32_t frame_id
) override
;
28 DISALLOW_COPY_AND_ASSIGN(FrameTreeManager
);
31 } // namespace html_viewer
33 #endif // COMPONENTS_HTML_VIEWER_FRAME_TREE_MANAGER_H_