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_CONNECTION_H_
6 #define MANDOLINE_TAB_FRAME_CONNECTION_H_
8 #include "base/basictypes.h"
9 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
10 #include "mandoline/tab/frame_user_data.h"
11 #include "mandoline/tab/public/interfaces/frame_tree.mojom.h"
12 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
15 class ApplicationConnection
;
16 class ApplicationImpl
;
21 // FrameConnection is a FrameUserData that manages the connection to a
22 // particular frame. It is also responsible for obtaining the necessary
23 // services from the remote side.
24 class FrameConnection
: public FrameUserData
{
27 ~FrameConnection() override
;
29 void Init(mojo::ApplicationImpl
* app
,
30 mojo::URLRequestPtr request
,
31 mojo::ViewManagerClientPtr
* view_manage_client
);
33 FrameTreeClient
* frame_tree_client() { return frame_tree_client_
.get(); }
35 mojo::ApplicationConnection
* application_connection() {
36 return application_connection_
;
40 FrameTreeClientPtr frame_tree_client_
;
42 // TODO(sky): needs to be destroyed when connection lost.
43 mojo::ApplicationConnection
* application_connection_
;
45 DISALLOW_COPY_AND_ASSIGN(FrameConnection
);
48 } // namespace mandoline
50 #endif // MANDOLINE_TAB_FRAME_CONNECTION_H_