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

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

Issue 10855113: Show extension settings for extension notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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_bubble_view.h ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_bubble_view.cc
diff --git a/ash/system/tray/tray_bubble_view.cc b/ash/system/tray/tray_bubble_view.cc
index 4551e9d27caf0eb3b7051b3e1b9c47b2f483919d..dc443a49f99bd09dd854569dc07ef68eaf12ae83 100644
--- a/ash/system/tray/tray_bubble_view.cc
+++ b/ash/system/tray/tray_bubble_view.cc
@@ -4,9 +4,11 @@
#include "ash/system/tray/tray_bubble_view.h"
+#include "ash/root_window_controller.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/system/tray/tray_constants.h"
+#include "ash/wm/property_util.h"
#include "ash/wm/shelf_layout_manager.h"
#include "ash/wm/window_animations.h"
#include "grit/ash_strings.h"
@@ -463,7 +465,7 @@ bool TrayBubbleView::Host::PreHandleKeyEvent(aura::Window* target,
bool TrayBubbleView::Host::PreHandleMouseEvent(aura::Window* target,
ui::MouseEvent* event) {
if (event->type() == ui::ET_MOUSE_PRESSED)
- ProcessLocatedEvent(*event);
+ ProcessLocatedEvent(target, *event);
return false;
}
@@ -471,7 +473,7 @@ ui::TouchStatus TrayBubbleView::Host::PreHandleTouchEvent(
aura::Window* target,
ui::TouchEvent* event) {
if (event->type() == ui::ET_TOUCH_PRESSED)
- ProcessLocatedEvent(*event);
+ ProcessLocatedEvent(target, *event);
return ui::TOUCH_STATUS_UNKNOWN;
}
@@ -482,7 +484,16 @@ ui::GestureStatus TrayBubbleView::Host::PreHandleGestureEvent(
}
void TrayBubbleView::Host::ProcessLocatedEvent(
- const ui::LocatedEvent& event) {
+ aura::Window* target, const ui::LocatedEvent& event) {
+ if (target) {
+ // Don't process events that occurred inside an embedded menu.
+ RootWindowController* root_controller =
+ GetRootWindowController(target->GetRootWindow());
+ if (root_controller && root_controller->GetContainer(
+ ash::internal::kShellWindowId_MenuContainer)->Contains(target)) {
+ return;
+ }
+ }
if (!widget_)
return;
gfx::Rect bounds = widget_->GetNativeWindow()->GetBoundsInRootWindow();
« no previous file with comments | « ash/system/tray/tray_bubble_view.h ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698