| 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_node_data.h" | 10 #include "ui/accessibility/ax_node_data.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 : parent_(parent), | 44 : parent_(parent), |
| 45 source_id_(source_id), | 45 source_id_(source_id), |
| 46 style_(style), | 46 style_(style), |
| 47 icon_view_(new views::ImageView()), | 47 icon_view_(new views::ImageView()), |
| 48 image_view_(new views::ImageView()), | 48 image_view_(new views::ImageView()), |
| 49 label_(new views::Label()), | 49 label_(new views::Label()), |
| 50 selected_(false) { | 50 selected_(false) { |
| 51 AddChildView(icon_view_); | 51 AddChildView(icon_view_); |
| 52 AddChildView(image_view_); | 52 AddChildView(image_view_); |
| 53 AddChildView(label_); | 53 AddChildView(label_); |
| 54 icon_view_->set_interactive(false); | 54 icon_view_->set_can_process_events_within_subtree(false); |
| 55 image_view_->set_interactive(false); | 55 image_view_->set_can_process_events_within_subtree(false); |
| 56 SetFocusBehavior(FocusBehavior::ALWAYS); | 56 SetFocusBehavior(FocusBehavior::ALWAYS); |
| 57 SetStyle(style_); | 57 SetStyle(style_); |
| 58 } | 58 } |
| 59 | 59 |
| 60 DesktopMediaSourceView::~DesktopMediaSourceView() {} | 60 DesktopMediaSourceView::~DesktopMediaSourceView() {} |
| 61 | 61 |
| 62 const char* DesktopMediaSourceView::kDesktopMediaSourceViewClassName = | 62 const char* DesktopMediaSourceView::kDesktopMediaSourceViewClassName = |
| 63 "DesktopMediaPicker_DesktopMediaSourceView"; | 63 "DesktopMediaPicker_DesktopMediaSourceView"; |
| 64 | 64 |
| 65 void DesktopMediaSourceView::SetName(const base::string16& name) { | 65 void DesktopMediaSourceView::SetName(const base::string16& name) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::GetAccessibleNodeData(ui::AXNodeData* node_data) { | 202 void DesktopMediaSourceView::GetAccessibleNodeData(ui::AXNodeData* node_data) { |
| 203 node_data->role = ui::AX_ROLE_BUTTON; | 203 node_data->role = ui::AX_ROLE_BUTTON; |
| 204 node_data->SetName(label_->text()); | 204 node_data->SetName(label_->text()); |
| 205 } | 205 } |
| OLD | NEW |