| 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 "ash/common/system/chromeos/ime_menu/ime_list_view.h" | 5 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/system/tray/hover_highlight_view.h" | 8 #include "ash/common/system/tray/hover_highlight_view.h" |
| 9 #include "ash/common/system/tray/ime_info.h" | 9 #include "ash/common/system/tray/ime_info.h" |
| 10 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
| 11 #include "ash/common/system/tray/tray_constants.h" | 11 #include "ash/common/system/tray/tray_constants.h" |
| 12 #include "ash/common/system/tray/tray_details_view.h" | 12 #include "ash/common/system/tray/tray_details_view.h" |
| 13 #include "ash/common/system/tray/tray_popup_header_button.h" | 13 #include "ash/common/system/tray/tray_popup_header_button.h" |
| 14 #include "ash/common/system/tray/tray_popup_item_style.h" | 14 #include "ash/common/system/tray/tray_popup_item_style.h" |
| 15 #include "ash/common/wm_shell.h" | 15 #include "ash/common/wm_shell.h" |
| 16 #include "grit/ash_resources.h" | 16 #include "grit/ash_resources.h" |
| 17 #include "grit/ash_strings.h" | 17 #include "grit/ash_strings.h" |
| 18 #include "ui/accessibility/ax_view_state.h" | 18 #include "ui/accessibility/ax_node_data.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
| 21 #include "ui/gfx/color_palette.h" | 21 #include "ui/gfx/color_palette.h" |
| 22 #include "ui/gfx/paint_vector_icon.h" | 22 #include "ui/gfx/paint_vector_icon.h" |
| 23 #include "ui/gfx/vector_icons_public.h" | 23 #include "ui/gfx/vector_icons_public.h" |
| 24 #include "ui/keyboard/keyboard_util.h" | 24 #include "ui/keyboard/keyboard_util.h" |
| 25 #include "ui/views/border.h" | 25 #include "ui/views/border.h" |
| 26 #include "ui/views/controls/button/label_button.h" | 26 #include "ui/views/controls/button/label_button.h" |
| 27 #include "ui/views/controls/label.h" | 27 #include "ui/views/controls/label.h" |
| 28 #include "ui/views/controls/separator.h" | 28 #include "ui/views/controls/separator.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 52 const base::string16& label, | 52 const base::string16& label, |
| 53 bool selected) | 53 bool selected) |
| 54 : HoverHighlightView(listener), selected_(selected) { | 54 : HoverHighlightView(listener), selected_(selected) { |
| 55 AddLabel(label, gfx::ALIGN_LEFT, selected); | 55 AddLabel(label, gfx::ALIGN_LEFT, selected); |
| 56 } | 56 } |
| 57 | 57 |
| 58 ~SelectableHoverHighlightView() override {} | 58 ~SelectableHoverHighlightView() override {} |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 // views::View: | 61 // views::View: |
| 62 void GetAccessibleState(ui::AXViewState* state) override { | 62 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { |
| 63 HoverHighlightView::GetAccessibleState(state); | 63 HoverHighlightView::GetAccessibleNodeData(node_data); |
| 64 state->role = ui::AX_ROLE_CHECK_BOX; | 64 node_data->role = ui::AX_ROLE_CHECK_BOX; |
| 65 if (selected_) | 65 if (selected_) |
| 66 state->AddStateFlag(ui::AX_STATE_CHECKED); | 66 node_data->AddStateFlag(ui::AX_STATE_CHECKED); |
| 67 } | 67 } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 bool selected_; | 70 bool selected_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(SelectableHoverHighlightView); | 72 DISALLOW_COPY_AND_ASSIGN(SelectableHoverHighlightView); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 // The view that contains IME short name and the IME label. | 75 // The view that contains IME short name and the IME label. |
| 76 class ImeInfoView : public views::View { | 76 class ImeInfoView : public views::View { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 if (property == property_map_.end()) | 283 if (property == property_map_.end()) |
| 284 return; | 284 return; |
| 285 const std::string key = property->second; | 285 const std::string key = property->second; |
| 286 delegate->ActivateIMEProperty(key); | 286 delegate->ActivateIMEProperty(key); |
| 287 } | 287 } |
| 288 | 288 |
| 289 GetWidget()->Close(); | 289 GetWidget()->Close(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace ash | 292 } // namespace ash |
| OLD | NEW |