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

Unified Diff: ash/system/ime_menu/ime_menu_tray.cc

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Swiping IME/Stylues/System tray/Notifications tray/bubble. Created 3 years, 5 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
Index: ash/system/ime_menu/ime_menu_tray.cc
diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc
index df15493b0e9bdbf761bcf795c5098bda8f458828..bd5e591782dc5f290247eabbed9f2dd2dd174702 100644
--- a/ash/system/ime_menu/ime_menu_tray.cc
+++ b/ash/system/ime_menu/ime_menu_tray.cc
@@ -470,6 +470,33 @@ bool ImeMenuTray::PerformAction(const ui::Event& event) {
return true;
}
+bool ImeMenuTray::HasBubble() {
+ return bubble_.get() != NULL;
msw 2017/07/12 05:04:50 nit: this should be moot, but use nullptr instead
minch1 2017/07/13 19:10:34 Done.
+}
+
+void ImeMenuTray::CloseBubble() {
+ HideImeMenuBubble();
+}
+
+void ImeMenuTray::ShowBubble() {
+ ShowImeMenuBubble();
+}
+
+views::TrayBubbleView* ImeMenuTray::GetBubbleView() {
+ if (HasBubble())
msw 2017/07/12 05:04:50 nit: return bubble_ ? bubble_->bubble_view() : nul
minch1 2017/07/13 19:10:34 Done.
+ return bubble_->bubble_view();
+ return nullptr;
+}
+
+void ImeMenuTray::OnGestureEvent(ui::GestureEvent* event) {
+ if (drag_controller()->ProcessGestureEvent(*event, this,
+ false /* is_on_bubble */)) {
+ event->SetHandled();
msw 2017/07/12 05:04:50 Please make DragController::ProcessGestureEvent ta
minch1 2017/07/13 19:10:34 Done.
+ } else {
+ TrayBackgroundView::OnGestureEvent(event);
+ }
+}
+
void ImeMenuTray::OnIMERefresh() {
UpdateTrayLabel();
if (bubble_ && ime_list_view_) {
@@ -519,6 +546,10 @@ void ImeMenuTray::HideBubble(const views::TrayBubbleView* bubble_view) {
HideBubbleWithView(bubble_view);
}
+bool ImeMenuTray::ProcessGestureEventForBubble(ui::GestureEvent* event) {
+ return drag_controller()->ProcessGestureEvent(*event, this,
+ true /* is_on_bubble */);
+}
void ImeMenuTray::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {}
void ImeMenuTray::OnKeyboardClosed() {

Powered by Google App Engine
This is Rietveld 408576698