| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "ash/common/devtools/ash_devtools_dom_agent.h" | 5 #include "ash/common/devtools/ash_devtools_dom_agent.h" |
| 6 | 6 |
| 7 #include "ash/common/wm_window.h" | 7 #include "ash/common/wm_window.h" |
| 8 #include "ash/public/cpp/shell_window_ids.h" | 8 #include "ash/public/cpp/shell_window_ids.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 .setAttributes(std::move(attributes)) | 34 .setAttributes(std::move(attributes)) |
| 35 .build(); | 35 .build(); |
| 36 node->setChildNodeCount(children->length()); | 36 node->setChildNodeCount(children->length()); |
| 37 node->setChildren(std::move(children)); | 37 node->setChildren(std::move(children)); |
| 38 return node; | 38 return node; |
| 39 } | 39 } |
| 40 | 40 |
| 41 std::unique_ptr<Array<std::string>> GetAttributes(const ash::WmWindow* window) { | 41 std::unique_ptr<Array<std::string>> GetAttributes(const ash::WmWindow* window) { |
| 42 std::unique_ptr<Array<std::string>> attributes = Array<std::string>::create(); | 42 std::unique_ptr<Array<std::string>> attributes = Array<std::string>::create(); |
| 43 attributes->addItem("name"); | 43 attributes->addItem("name"); |
| 44 attributes->addItem(window->GetName()); | 44 attributes->addItem(window->aura_window()->GetName()); |
| 45 attributes->addItem("active"); | 45 attributes->addItem("active"); |
| 46 attributes->addItem(window->IsActive() ? "true" : "false"); | 46 attributes->addItem(window->IsActive() ? "true" : "false"); |
| 47 return attributes; | 47 return attributes; |
| 48 } | 48 } |
| 49 | 49 |
| 50 std::unique_ptr<Array<std::string>> GetAttributes(const views::Widget* widget) { | 50 std::unique_ptr<Array<std::string>> GetAttributes(const views::Widget* widget) { |
| 51 std::unique_ptr<Array<std::string>> attributes = Array<std::string>::create(); | 51 std::unique_ptr<Array<std::string>> attributes = Array<std::string>::create(); |
| 52 attributes->addItem("name"); | 52 attributes->addItem("name"); |
| 53 attributes->addItem(widget->GetName()); | 53 attributes->addItem(widget->GetName()); |
| 54 attributes->addItem("active"); | 54 attributes->addItem("active"); |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 return ui::devtools::protocol::Response::OK(); | 524 return ui::devtools::protocol::Response::OK(); |
| 525 } | 525 } |
| 526 | 526 |
| 527 bool AshDevToolsDOMAgent::IsHighlightingWindow(WmWindow* window) { | 527 bool AshDevToolsDOMAgent::IsHighlightingWindow(WmWindow* window) { |
| 528 return widget_for_highlighting_ && | 528 return widget_for_highlighting_ && |
| 529 GetWidgetFromWmWindow(window) == widget_for_highlighting_.get(); | 529 GetWidgetFromWmWindow(window) == widget_for_highlighting_.get(); |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace devtools | 532 } // namespace devtools |
| 533 } // namespace ash | 533 } // namespace ash |
| OLD | NEW |