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

Side by Side Diff: ash/first_run/first_run_helper_impl.cc

Issue 2070143003: Add MD ink drop ripple to app list button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b612539_shelf_button_ripple
Patch Set: Rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/first_run/first_run_helper_impl.h" 5 #include "ash/first_run/first_run_helper_impl.h"
6 6
7 #include "ash/common/shell_window_ids.h" 7 #include "ash/common/shell_window_ids.h"
8 #include "ash/shelf/app_list_button.h"
8 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
9 #include "ash/shell.h" 10 #include "ash/shell.h"
10 #include "ash/system/tray/system_tray.h" 11 #include "ash/system/tray/system_tray.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "ui/app_list/views/app_list_view.h" 13 #include "ui/app_list/views/app_list_view.h"
13 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
14 #include "ui/display/display.h" 15 #include "ui/display/display.h"
15 #include "ui/display/screen.h" 16 #include "ui/display/screen.h"
16 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
17 #include "ui/views/view.h" 18 #include "ui/views/view.h"
(...skipping 29 matching lines...) Expand all
47 CloseTrayBubble(); 48 CloseTrayBubble();
48 widget_->Close(); 49 widget_->Close();
49 } 50 }
50 51
51 views::Widget* FirstRunHelperImpl::GetOverlayWidget() { 52 views::Widget* FirstRunHelperImpl::GetOverlayWidget() {
52 return widget_; 53 return widget_;
53 } 54 }
54 55
55 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { 56 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() {
56 Shelf* shelf = Shelf::ForPrimaryDisplay(); 57 Shelf* shelf = Shelf::ForPrimaryDisplay();
57 views::View* app_button = shelf->GetAppListButtonView(); 58 AppListButton* app_button = shelf->GetAppListButton();
58 return app_button->GetBoundsInScreen(); 59 return app_button->GetBoundsInScreen();
59 } 60 }
60 61
61 void FirstRunHelperImpl::Cancel() { 62 void FirstRunHelperImpl::Cancel() {
62 FOR_EACH_OBSERVER(Observer, observers(), OnCancelled()); 63 FOR_EACH_OBSERVER(Observer, observers(), OnCancelled());
63 } 64 }
64 65
65 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) { 66 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) {
66 return event->key_code() == ui::VKEY_ESCAPE; 67 return event->key_code() == ui::VKEY_ESCAPE;
67 } 68 }
(...skipping 24 matching lines...) Expand all
92 return bubble->GetBoundsInScreen(); 93 return bubble->GetBoundsInScreen();
93 } 94 }
94 95
95 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { 96 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() {
96 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); 97 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray();
97 views::View* help_button = tray->GetHelpButtonView(); 98 views::View* help_button = tray->GetHelpButtonView();
98 return help_button->GetBoundsInScreen(); 99 return help_button->GetBoundsInScreen();
99 } 100 }
100 101
101 } // namespace ash 102 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698