OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 "ash/common/devtools/ui_element.h" |
| 6 |
| 7 namespace ash { |
| 8 namespace devtools { |
| 9 |
| 10 UIElement::UIElement() {} |
| 11 |
| 12 UIElement::~UIElement() {} |
| 13 |
| 14 UIElement* UIElement::GetInstance() { |
| 15 DCHECK(instance_); |
| 16 return instance_; |
| 17 } |
| 18 |
| 19 UIElement::UIElement(int node_id) { |
| 20 node_id_ = node_id; |
| 21 } |
| 22 |
| 23 // static |
| 24 UIElement* UIElement::ConvertNodeIdToUIElement(int node_id) { |
| 25 return GetInstance()->node_id_to_ui_element[node_id]; |
| 26 } |
| 27 |
| 28 int UIElement::GetNodeId() const { |
| 29 return node_id_; |
| 30 } |
| 31 |
| 32 } // namespace devtools |
| 33 } // namespace ash |
OLD | NEW |