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

Side by Side Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2303963002: cros/ash: If the partial magnifier is active, do not consume input events if over palette views. (Closed)
Patch Set: Address comments Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/chromeos/palette/palette_tray.h" 5 #include "ash/common/system/chromeos/palette/palette_tray.h"
6 6
7 #include "ash/common/shelf/shelf_constants.h" 7 #include "ash/common/shelf/shelf_constants.h"
8 #include "ash/common/shelf/wm_shelf.h" 8 #include "ash/common/shelf/wm_shelf.h"
9 #include "ash/common/shelf/wm_shelf_util.h" 9 #include "ash/common/shelf/wm_shelf_util.h"
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 bubble_view->AddChildView(separator); 213 bubble_view->AddChildView(separator);
214 AddToolsToView(bubble_view); 214 AddToolsToView(bubble_view);
215 215
216 // Show the bubble. 216 // Show the bubble.
217 bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view)); 217 bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view));
218 218
219 SetDrawBackgroundAsActive(true); 219 SetDrawBackgroundAsActive(true);
220 return true; 220 return true;
221 } 221 }
222 222
223 bool PaletteTray::ContainsPointInScreen(const gfx::Point& point) {
224 if (icon_ && icon_->GetBoundsInScreen().Contains(point))
225 return true;
226
227 return bubble_ && bubble_->bubble_view()->GetBoundsInScreen().Contains(point);
228 }
229
223 void PaletteTray::AddToolsToView(views::View* host) { 230 void PaletteTray::AddToolsToView(views::View* host) {
224 std::vector<PaletteToolView> views = palette_tool_manager_->CreateViews(); 231 std::vector<PaletteToolView> views = palette_tool_manager_->CreateViews();
225 for (const PaletteToolView& view : views) 232 for (const PaletteToolView& view : views)
226 host->AddChildView(view.view); 233 host->AddChildView(view.view);
227 } 234 }
228 235
229 void PaletteTray::SessionStateChanged( 236 void PaletteTray::SessionStateChanged(
230 SessionStateDelegate::SessionState state) { 237 SessionStateDelegate::SessionState state) {
231 UpdateIconVisibility(); 238 UpdateIconVisibility();
232 } 239 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 WmShell::Get()->GetSessionStateDelegate(); 378 WmShell::Get()->GetSessionStateDelegate();
372 379
373 SetVisible(!session_state_delegate->IsScreenLocked() && 380 SetVisible(!session_state_delegate->IsScreenLocked() &&
374 session_state_delegate->GetSessionState() == 381 session_state_delegate->GetSessionState() ==
375 SessionStateDelegate::SESSION_STATE_ACTIVE && 382 SessionStateDelegate::SESSION_STATE_ACTIVE &&
376 WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() != 383 WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() !=
377 LoginStatus::KIOSK_APP); 384 LoginStatus::KIOSK_APP);
378 } 385 }
379 386
380 } // namespace ash 387 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/palette/palette_tray.h ('k') | ash/common/system/chromeos/palette/palette_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698