Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: blimp/client/core/render_widget/blimp_document.cc

Issue 2382733007: Add BlimpDocument, pull out functions in BlimpCompositor. (Closed)
Patch Set: Fix linux client. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #include "blimp/client/core/render_widget/blimp_document.h"
6
7 #include "blimp/client/core/render_widget/blimp_document_manager.h"
8 #include "cc/layers/layer.h"
9
10 namespace blimp {
11 namespace client {
12
13 BlimpDocument::BlimpDocument(int render_widget_id,
14 BlimpCompositorDependencies* compositor_deps,
15 BlimpDocumentManager* document_manager)
16 : render_widget_id_(render_widget_id), manager_(document_manager) {
17 compositor_ = base::MakeUnique<BlimpCompositor>(compositor_deps, this);
18 }
19
20 BlimpDocument::~BlimpDocument() = default;
21
22 BlimpCompositor* BlimpDocument::GetCompositor() {
23 return compositor_.get();
24 }
25
26 void BlimpDocument::SetCompositorForTest(
27 std::unique_ptr<BlimpCompositor> compositor) {
28 compositor_.reset();
Khushal 2016/10/03 20:04:59 nit: Don't need to reset.
xingliu 2016/10/04 18:33:49 Done.
29 compositor_ = std::move(compositor);
30 }
31
32 void BlimpDocument::SendWebGestureEvent(
33 const blink::WebGestureEvent& gesture_event) {
34 manager_->SendWebGestureEvent(render_widget_id_, gesture_event);
35 }
36
37 void BlimpDocument::SendCompositorMessage(
38 const cc::proto::CompositorMessage& message) {
39 manager_->SendCompositorMessage(render_widget_id_, message);
40 }
41
42 } // namespace client
43 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698