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

Side by Side Diff: ui/message_center/views/toast_contents_view.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/message_center/views/toast_contents_view.h" 5 #include "ui/message_center/views/toast_contents_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "ui/accessibility/ax_view_state.h" 14 #include "ui/accessibility/ax_node_data.h"
15 #include "ui/display/display.h" 15 #include "ui/display/display.h"
16 #include "ui/display/screen.h" 16 #include "ui/display/screen.h"
17 #include "ui/gfx/animation/animation_delegate.h" 17 #include "ui/gfx/animation/animation_delegate.h"
18 #include "ui/gfx/animation/slide_animation.h" 18 #include "ui/gfx/animation/slide_animation.h"
19 #include "ui/message_center/message_center_style.h" 19 #include "ui/message_center/message_center_style.h"
20 #include "ui/message_center/notification.h" 20 #include "ui/message_center/notification.h"
21 #include "ui/message_center/views/message_popup_collection.h" 21 #include "ui/message_center/views/message_popup_collection.h"
22 #include "ui/message_center/views/message_view.h" 22 #include "ui/message_center/views/message_view.h"
23 #include "ui/message_center/views/popup_alignment_delegate.h" 23 #include "ui/message_center/views/popup_alignment_delegate.h"
24 #include "ui/views/background.h" 24 #include "ui/views/background.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 preferred_size_.height() > new_size.height(); 302 preferred_size_.height() > new_size.height();
303 preferred_size_ = new_size; 303 preferred_size_ = new_size;
304 Layout(); 304 Layout();
305 if (change_instantly) { 305 if (change_instantly) {
306 SetBoundsInstantly(bounds()); 306 SetBoundsInstantly(bounds());
307 return; 307 return;
308 } 308 }
309 SetBoundsWithAnimation(bounds()); 309 SetBoundsWithAnimation(bounds());
310 } 310 }
311 311
312 void ToastContentsView::GetAccessibleState(ui::AXViewState* state) { 312 void ToastContentsView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
313 if (child_count() > 0) 313 if (child_count() > 0)
314 child_at(0)->GetAccessibleState(state); 314 child_at(0)->GetAccessibleNodeData(node_data);
315 state->role = ui::AX_ROLE_WINDOW; 315 node_data->role = ui::AX_ROLE_WINDOW;
316 } 316 }
317 317
318 void ToastContentsView::ClickOnNotification( 318 void ToastContentsView::ClickOnNotification(
319 const std::string& notification_id) { 319 const std::string& notification_id) {
320 if (collection_) 320 if (collection_)
321 collection_->ClickOnNotification(notification_id); 321 collection_->ClickOnNotification(notification_id);
322 } 322 }
323 323
324 void ToastContentsView::ClickOnSettingsButton( 324 void ToastContentsView::ClickOnSettingsButton(
325 const std::string& notification_id) { 325 const std::string& notification_id) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 380
381 gfx::Rect ToastContentsView::GetClosedToastBounds(gfx::Rect bounds) { 381 gfx::Rect ToastContentsView::GetClosedToastBounds(gfx::Rect bounds) {
382 return gfx::Rect(bounds.x() + bounds.width() - kClosedToastWidth, 382 return gfx::Rect(bounds.x() + bounds.width() - kClosedToastWidth,
383 bounds.y(), 383 bounds.y(),
384 kClosedToastWidth, 384 kClosedToastWidth,
385 bounds.height()); 385 bounds.height());
386 } 386 }
387 387
388 } // namespace message_center 388 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/toast_contents_view.h ('k') | ui/views/accessibility/ax_view_obj_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698