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

Unified Diff: ash/common/devtools/ash_devtools_dom_agent.cc

Issue 2726823003: Remove WmLookup. (Closed)
Patch Set: Clean up include and modify comment. Created 3 years, 10 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 | « ash/common/devtools/ash_devtools_css_agent.cc ('k') | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/devtools/ash_devtools_dom_agent.cc
diff --git a/ash/common/devtools/ash_devtools_dom_agent.cc b/ash/common/devtools/ash_devtools_dom_agent.cc
index fe2e63170b7fdb2a6e3ca6a74d688b9f32f57247..79aa433944d49c29a9b175d30cc40baccf143619 100644
--- a/ash/common/devtools/ash_devtools_dom_agent.cc
+++ b/ash/common/devtools/ash_devtools_dom_agent.cc
@@ -4,7 +4,6 @@
#include "ash/common/devtools/ash_devtools_dom_agent.h"
-#include "ash/common/wm_lookup.h"
#include "ash/common/wm_window.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
@@ -366,8 +365,7 @@ void AshDevToolsDOMAgent::RemoveWidgetNode(views::Widget* widget,
DCHECK(widget_to_node_id_it != widget_to_node_id_map_.end());
int node_id = widget_to_node_id_it->second;
- int parent_id =
- GetNodeIdFromWindow(WmLookup::Get()->GetWindowForWidget(widget));
+ int parent_id = GetNodeIdFromWindow(WmWindow::Get(widget->GetNativeWindow()));
if (remove_observer)
widget->RemoveRemovalsObserver(this);
@@ -454,15 +452,15 @@ AshDevToolsDOMAgent::GetNodeWindowAndBounds(int node_id) {
views::Widget* widget = GetWidgetFromNodeId(node_id);
if (widget) {
- return std::make_pair(WmLookup::Get()->GetWindowForWidget(widget),
+ return std::make_pair(WmWindow::Get(widget->GetNativeWindow()),
widget->GetWindowBoundsInScreen());
}
views::View* view = GetViewFromNodeId(node_id);
if (view) {
gfx::Rect bounds = view->GetBoundsInScreen();
- return std::make_pair(
- WmLookup::Get()->GetWindowForWidget(view->GetWidget()), bounds);
+ return std::make_pair(WmWindow::Get(view->GetWidget()->GetNativeWindow()),
+ bounds);
}
return std::make_pair(nullptr, gfx::Rect());
@@ -495,8 +493,7 @@ void AshDevToolsDOMAgent::UpdateHighlight(
root_view->SetBorder(views::CreateSolidBorder(kBorderThickness, border));
root_view->set_background(
views::Background::CreateSolidBackground(background));
- WmLookup::Get()
- ->GetWindowForWidget(widget_for_highlighting_.get())
+ WmWindow::Get(widget_for_highlighting_->GetNativeWindow())
->SetBoundsInScreen(window_and_bounds.second,
window_and_bounds.first->GetDisplayNearestWindow());
}
« no previous file with comments | « ash/common/devtools/ash_devtools_css_agent.cc ('k') | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698