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

Unified Diff: ash/wm/window_mirror_view.cc

Issue 2798333005: Moves WmWindow::GetInternalWidget() into a standalone function (Closed)
Patch Set: Created 3 years, 8 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/wm/widget_finder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_mirror_view.cc
diff --git a/ash/wm/window_mirror_view.cc b/ash/wm/window_mirror_view.cc
index 94dd84730cd2d595a695508901f7aeee7580555d..d2bb88479ce0c5b4ca74d4e040fdfae4a64c4a77 100644
--- a/ash/wm/window_mirror_view.cc
+++ b/ash/wm/window_mirror_view.cc
@@ -6,6 +6,7 @@
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_window.h"
+#include "ash/wm/widget_finder.h"
#include "ash/wm/window_state_aura.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
@@ -111,9 +112,10 @@ gfx::Rect WindowMirrorView::GetClientAreaBounds() const {
return bounds;
}
// The target window may not have a widget in unit tests.
- if (!target_->GetInternalWidget())
+ views::Widget* widget = GetInternalWidgetForWindow(target_->aura_window());
+ if (!widget)
return gfx::Rect();
- views::View* client_view = target_->GetInternalWidget()->client_view();
+ views::View* client_view = widget->client_view();
return client_view->ConvertRectToWidget(client_view->GetLocalBounds());
}
« no previous file with comments | « ash/wm/widget_finder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698