cc: Fix DRLI unit test failure with property tree verification
[chromium-blink-merge.git] / mandoline / tab / frame_tree.cc
blobb833a5908c29cb20136c3bfac1c844ff81bd8dea
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 #include "mandoline/tab/frame_tree.h"
7 #include "mandoline/tab/frame_user_data.h"
9 namespace mandoline {
11 FrameTree::FrameTree(mojo::View* view,
12 FrameTreeDelegate* delegate,
13 FrameTreeClient* root_client,
14 scoped_ptr<FrameUserData> user_data)
15 : view_(view),
16 delegate_(delegate),
17 root_(this,
18 view,
19 ViewOwnership::DOESNT_OWN_VIEW,
20 root_client,
21 user_data.Pass()) {
22 root_.Init(nullptr);
25 FrameTree::~FrameTree() {
28 Frame* FrameTree::CreateAndAddFrame(mojo::View* view,
29 Frame* parent,
30 FrameTreeClient* client,
31 scoped_ptr<FrameUserData> user_data) {
32 Frame* frame =
33 new Frame(this, view, ViewOwnership::OWNS_VIEW, client, user_data.Pass());
34 frame->Init(parent);
35 return frame;
38 } // namespace mandoline