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

Side by Side Diff: ui/views/bubble/tray_bubble_view.cc

Issue 2414213003: Use accessibility name of the bubble widget for ChromeVox. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « ui/views/bubble/tray_bubble_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bubble/tray_bubble_view.h" 5 #include "ui/views/bubble/tray_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 bool TrayBubbleView::WidgetHasHitTestMask() const { 421 bool TrayBubbleView::WidgetHasHitTestMask() const {
422 return true; 422 return true;
423 } 423 }
424 424
425 void TrayBubbleView::GetWidgetHitTestMask(gfx::Path* mask) const { 425 void TrayBubbleView::GetWidgetHitTestMask(gfx::Path* mask) const {
426 DCHECK(mask); 426 DCHECK(mask);
427 mask->addRect(gfx::RectToSkRect(GetBubbleFrameView()->GetContentsBounds())); 427 mask->addRect(gfx::RectToSkRect(GetBubbleFrameView()->GetContentsBounds()));
428 } 428 }
429 429
430 base::string16 TrayBubbleView::GetAccessibleWindowTitle() const {
431 return delegate_->GetAccessibleNameForBubble();
432 }
433
430 gfx::Size TrayBubbleView::GetPreferredSize() const { 434 gfx::Size TrayBubbleView::GetPreferredSize() const {
431 return gfx::Size(preferred_width_, GetHeightForWidth(preferred_width_)); 435 return gfx::Size(preferred_width_, GetHeightForWidth(preferred_width_));
432 } 436 }
433 437
434 gfx::Size TrayBubbleView::GetMaximumSize() const { 438 gfx::Size TrayBubbleView::GetMaximumSize() const {
435 gfx::Size size = GetPreferredSize(); 439 gfx::Size size = GetPreferredSize();
436 size.set_width(params_.max_width); 440 size.set_width(params_.max_width);
437 return size; 441 return size;
438 } 442 }
439 443
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 510
507 void TrayBubbleView::ViewHierarchyChanged( 511 void TrayBubbleView::ViewHierarchyChanged(
508 const ViewHierarchyChangedDetails& details) { 512 const ViewHierarchyChangedDetails& details) {
509 if (details.is_add && details.child == this) { 513 if (details.is_add && details.child == this) {
510 details.parent->SetPaintToLayer(true); 514 details.parent->SetPaintToLayer(true);
511 details.parent->layer()->SetMasksToBounds(true); 515 details.parent->layer()->SetMasksToBounds(true);
512 } 516 }
513 } 517 }
514 518
515 } // namespace views 519 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/tray_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698