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

Unified Diff: ash/system/tray/tray_event_filter.cc

Issue 2086143002: Convert TrayEventFilter to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak 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/system/tray/tray_background_view.cc ('k') | ash/sysui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_event_filter.cc
diff --git a/ash/system/tray/tray_event_filter.cc b/ash/system/tray/tray_event_filter.cc
index 815973aee14d57481639f976499933b8953ce15a..46b8194458ca1148e805cb6d79f1fe5b435d47dc 100644
--- a/ash/system/tray/tray_event_filter.cc
+++ b/ash/system/tray/tray_event_filter.cc
@@ -5,17 +5,12 @@
#include "ash/system/tray/tray_event_filter.h"
#include "ash/common/shell_window_ids.h"
-#include "ash/common/system/tray/tray_constants.h"
-#include "ash/container_delegate.h"
-#include "ash/root_window_controller.h"
-#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shell.h"
+#include "ash/common/wm/container_finder.h"
+#include "ash/common/wm_lookup.h"
+#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window.h"
#include "ash/system/tray/tray_background_view.h"
#include "ash/system/tray/tray_bubble_wrapper.h"
-#include "ash/system/tray/tray_event_filter.h"
-#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -31,13 +26,13 @@ void TrayEventFilter::AddWrapper(TrayBubbleWrapper* wrapper) {
bool was_empty = wrappers_.empty();
wrappers_.insert(wrapper);
if (was_empty && !wrappers_.empty())
- Shell::GetInstance()->AddPointerWatcher(this);
+ WmShell::Get()->AddPointerWatcher(this);
}
void TrayEventFilter::RemoveWrapper(TrayBubbleWrapper* wrapper) {
wrappers_.erase(wrapper);
if (wrappers_.empty())
- Shell::GetInstance()->RemovePointerWatcher(this);
+ WmShell::Get()->RemovePointerWatcher(this);
}
void TrayEventFilter::OnMousePressed(const ui::MouseEvent& event,
@@ -55,15 +50,15 @@ void TrayEventFilter::OnTouchPressed(const ui::TouchEvent& event,
void TrayEventFilter::ProcessPressedEvent(const gfx::Point& location_in_screen,
views::Widget* target) {
if (target) {
- ContainerDelegate* container_delegate =
- Shell::GetInstance()->container_delegate();
+ WmWindow* window = WmLookup::Get()->GetWindowForWidget(target);
+ int container_id = wm::GetContainerForWindow(window)->GetShellWindowId();
// Don't process events that occurred inside an embedded menu, for example
// the right-click menu in a popup notification.
- if (container_delegate->IsInMenuContainer(target))
+ if (container_id == kShellWindowId_MenuContainer)
return;
// Don't process events that occurred inside the status area widget and
// a popup notification from message center.
- if (container_delegate->IsInStatusContainer(target))
+ if (container_id == kShellWindowId_StatusContainer)
return;
}
« no previous file with comments | « ash/system/tray/tray_background_view.cc ('k') | ash/sysui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698