| OLD | NEW |
| 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 "chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h" | 5 #include "chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/media/webrtc/desktop_media_list.h" | 7 #include "chrome/browser/media/webrtc/desktop_media_list.h" |
| 8 #include "chrome/browser/ui/views/desktop_capture/desktop_media_list_view.h" | 8 #include "chrome/browser/ui/views/desktop_capture/desktop_media_list_view.h" |
| 9 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h" | 9 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h" |
| 10 #include "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_node_data.h" |
| 11 #include "ui/gfx/canvas.h" | 11 #include "ui/gfx/canvas.h" |
| 12 #include "ui/native_theme/native_theme.h" | 12 #include "ui/native_theme/native_theme.h" |
| 13 #include "ui/views/border.h" | 13 #include "ui/views/border.h" |
| 14 #include "ui/views/controls/image_view.h" | 14 #include "ui/views/controls/image_view.h" |
| 15 #include "ui/views/controls/label.h" | 15 #include "ui/views/controls/label.h" |
| 16 | 16 |
| 17 using content::DesktopMediaID; | 17 using content::DesktopMediaID; |
| 18 | 18 |
| 19 DesktopMediaSourceViewStyle::DesktopMediaSourceViewStyle( | 19 DesktopMediaSourceViewStyle::DesktopMediaSourceViewStyle( |
| 20 const DesktopMediaSourceViewStyle& style) = default; | 20 const DesktopMediaSourceViewStyle& style) = default; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 | 193 |
| 194 // Detect tap gesture using ET_GESTURE_TAP_DOWN so the view also gets focused | 194 // Detect tap gesture using ET_GESTURE_TAP_DOWN so the view also gets focused |
| 195 // on the long tap (when the tap gesture starts). | 195 // on the long tap (when the tap gesture starts). |
| 196 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { | 196 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { |
| 197 RequestFocus(); | 197 RequestFocus(); |
| 198 event->SetHandled(); | 198 event->SetHandled(); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 void DesktopMediaSourceView::GetAccessibleState(ui::AXViewState* state) { | 202 void DesktopMediaSourceView::GetAccessibleNodeData(ui::AXNodeData* node_data) { |
| 203 state->role = ui::AX_ROLE_BUTTON; | 203 node_data->role = ui::AX_ROLE_BUTTON; |
| 204 state->name = label_->text(); | 204 node_data->SetName(label_->text()); |
| 205 } | 205 } |
| OLD | NEW |