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

Side by Side Diff: ash/common/devtools/ui_element.cc

Issue 2776543002: Create a unified UIElement interface for Widget, View and Window. (Closed)
Patch Set: . Created 3 years, 9 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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698