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

Unified Diff: components/ui_devtools/views/ui_element.cc

Issue 2899783002: Move DevTools out of ash and turn it to a component. (Closed)
Patch Set: add README.md Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ui_devtools/views/ui_element.h ('k') | components/ui_devtools/views/ui_element_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ui_devtools/views/ui_element.cc
diff --git a/ash/devtools/ui_element.cc b/components/ui_devtools/views/ui_element.cc
similarity index 81%
rename from ash/devtools/ui_element.cc
rename to components/ui_devtools/views/ui_element.cc
index 0249d823d1f5ad9f2cf42c683f9dd5f4e6c99f83..a44ff1658c51c0b2fa190b328c4ffc1a7946d745 100644
--- a/ash/devtools/ui_element.cc
+++ b/components/ui_devtools/views/ui_element.cc
@@ -2,17 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/devtools/ui_element.h"
+#include "components/ui_devtools/views/ui_element.h"
#include <algorithm>
-#include "ash/devtools/ui_element_delegate.h"
-#include "ash/devtools/view_element.h"
-#include "ash/devtools/widget_element.h"
-#include "ash/devtools/window_element.h"
+#include "components/ui_devtools/views/ui_element_delegate.h"
+#include "components/ui_devtools/views/view_element.h"
+#include "components/ui_devtools/views/widget_element.h"
+#include "components/ui_devtools/views/window_element.h"
-namespace ash {
-namespace devtools {
+namespace ui_devtools {
namespace {
static int node_ids = 0;
@@ -63,7 +62,7 @@ void UIElement::ReorderChild(UIElement* child, int new_index) {
children_.erase(iter);
// Move child to new position |new_index| in vector |children_|.
- new_index = std::min(children_.size() - 1, static_cast<size_t>(new_index));
+ new_index = std::min(static_cast<int>(children_.size()) - 1, new_index);
iter = children_.begin() + new_index;
children_.insert(iter, child);
delegate()->OnUIElementReordered(child->parent(), child);
@@ -76,5 +75,4 @@ UIElement::UIElement(const UIElementType type,
delegate_->OnUIElementAdded(0, this);
}
-} // namespace devtools
-} // namespace ash
+} // namespace ui_devtools
« no previous file with comments | « components/ui_devtools/views/ui_element.h ('k') | components/ui_devtools/views/ui_element_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698