OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "mojo/services/view_manager/view.h" | 5 #include "mojo/services/view_manager/view.h" |
6 | 6 |
7 #include "mojo/services/view_manager/node.h" | 7 #include "mojo/services/view_manager/node.h" |
8 | 8 |
9 namespace mojo { | 9 namespace mojo { |
10 namespace services { | 10 namespace services { |
11 namespace view_manager { | 11 namespace view_manager { |
| 12 namespace service { |
12 | 13 |
13 View::View(const ViewId& id) : id_(id), node_(NULL) {} | 14 View::View(const ViewId& id) : id_(id), node_(NULL) {} |
14 | 15 |
15 View::~View() { | 16 View::~View() { |
16 } | 17 } |
17 | 18 |
18 void View::SetBitmap(const SkBitmap& bitmap) { | 19 void View::SetBitmap(const SkBitmap& bitmap) { |
19 bitmap_ = bitmap; | 20 bitmap_ = bitmap; |
20 if (node_) { | 21 if (node_) { |
21 node_->window()->SchedulePaintInRect( | 22 node_->window()->SchedulePaintInRect( |
22 gfx::Rect(node_->window()->bounds().size())); | 23 gfx::Rect(node_->window()->bounds().size())); |
23 } | 24 } |
24 } | 25 } |
25 | 26 |
| 27 } // namespace service |
26 } // namespace view_manager | 28 } // namespace view_manager |
27 } // namespace services | 29 } // namespace services |
28 } // namespace mojo | 30 } // namespace mojo |
OLD | NEW |