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

Unified Diff: ash/common/system/status_area_widget_delegate.cc

Issue 2109193002: mash: Convert StatusAreaWidgetDelegate to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 | « ash/common/system/status_area_widget_delegate.h ('k') | ash/focus_cycler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/status_area_widget_delegate.cc
diff --git a/ash/system/status_area_widget_delegate.cc b/ash/common/system/status_area_widget_delegate.cc
similarity index 93%
rename from ash/system/status_area_widget_delegate.cc
rename to ash/common/system/status_area_widget_delegate.cc
index 08c580e4254b32802b701bbd0d9d408edcfaf97d..834dbd72eaa1d6bdf3917613d525e8ead0333c13 100644
--- a/ash/system/status_area_widget_delegate.cc
+++ b/ash/common/system/status_area_widget_delegate.cc
@@ -2,17 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/status_area_widget_delegate.h"
+#include "ash/common/system/status_area_widget_delegate.h"
#include "ash/ash_export.h"
#include "ash/common/ash_switches.h"
#include "ash/common/focus_cycler.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shelf/shelf_constants.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/tray/tray_constants.h"
+#include "ash/common/wm_lookup.h"
+#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
@@ -78,10 +82,11 @@ const views::Widget* StatusAreaWidgetDelegate::GetWidget() const {
}
void StatusAreaWidgetDelegate::OnGestureEvent(ui::GestureEvent* event) {
- aura::Window* target_window = static_cast<views::View*>(event->target())
- ->GetWidget()
- ->GetNativeWindow();
- if (gesture_handler_.ProcessGestureEvent(*event, target_window))
+ views::Widget* target_widget =
+ static_cast<views::View*>(event->target())->GetWidget();
+ WmWindow* target_window = WmLookup::Get()->GetWindowForWidget(target_widget);
+ WmShelf* shelf = target_window->GetRootWindowController()->GetShelf();
+ if (shelf->ProcessGestureEvent(*event, target_window))
event->StopPropagation();
else
views::AccessiblePaneView::OnGestureEvent(event);
« no previous file with comments | « ash/common/system/status_area_widget_delegate.h ('k') | ash/focus_cycler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698