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

Side by Side Diff: ui/views/touchui/touch_selection_menu_runner_views.cc

Issue 1518543002: Adds MD ink ripple animations to buttons within location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds MD ink ripple animations to buttons within location bar (with WidgetObserver) Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/views/touchui/touch_selection_menu_runner_views.h" 5 #include "ui/views/touchui/touch_selection_menu_runner_views.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 ui::TouchSelectionMenuClient* const client_; 79 ui::TouchSelectionMenuClient* const client_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(Menu); 81 DISALLOW_COPY_AND_ASSIGN(Menu);
82 }; 82 };
83 83
84 TouchSelectionMenuRunnerViews::Menu::Menu(TouchSelectionMenuRunnerViews* owner, 84 TouchSelectionMenuRunnerViews::Menu::Menu(TouchSelectionMenuRunnerViews* owner,
85 ui::TouchSelectionMenuClient* client, 85 ui::TouchSelectionMenuClient* client,
86 const gfx::Rect& anchor_rect, 86 const gfx::Rect& anchor_rect,
87 const gfx::Size& handle_image_size, 87 const gfx::Size& handle_image_size,
88 aura::Window* context) 88 aura::Window* context)
89 : BubbleDelegateView(nullptr, BubbleBorder::BOTTOM_CENTER), 89 : BubbleDelegateView(static_cast<View*>(nullptr),
90 BubbleBorder::BOTTOM_CENTER),
90 owner_(owner), 91 owner_(owner),
91 client_(client) { 92 client_(client) {
92 DCHECK(owner_); 93 DCHECK(owner_);
93 DCHECK(client_); 94 DCHECK(client_);
94 95
95 set_shadow(BubbleBorder::SMALL_SHADOW); 96 set_shadow(BubbleBorder::SMALL_SHADOW);
96 set_parent_window(context); 97 set_parent_window(context);
97 set_margins(gfx::Insets(kMenuMargin, kMenuMargin, kMenuMargin, kMenuMargin)); 98 set_margins(gfx::Insets(kMenuMargin, kMenuMargin, kMenuMargin, kMenuMargin));
98 set_can_activate(false); 99 set_can_activate(false);
99 set_adjust_if_offscreen(true); 100 set_adjust_if_offscreen(true);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Closing the menu sets |menu_| to nullptr and eventually deletes the object. 267 // Closing the menu sets |menu_| to nullptr and eventually deletes the object.
267 menu_->Close(); 268 menu_->Close();
268 DCHECK(!menu_); 269 DCHECK(!menu_);
269 } 270 }
270 271
271 bool TouchSelectionMenuRunnerViews::IsRunning() const { 272 bool TouchSelectionMenuRunnerViews::IsRunning() const {
272 return menu_ != nullptr; 273 return menu_ != nullptr;
273 } 274 }
274 275
275 } // namespace views 276 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698