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

Side by Side Diff: chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h

Issue 2335373002: Desktop Capture Picker: More Clear Selection [M54] (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
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 #ifndef CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_
7 7
8 #include "content/public/browser/desktop_media_id.h" 8 #include "content/public/browser/desktop_media_id.h"
9 #include "ui/gfx/text_constants.h" 9 #include "ui/gfx/text_constants.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool is_selected() const { return selected_; } 63 bool is_selected() const { return selected_; }
64 64
65 // views::View interface. 65 // views::View interface.
66 const char* GetClassName() const override; 66 const char* GetClassName() const override;
67 views::View* GetSelectedViewForGroup(int group) override; 67 views::View* GetSelectedViewForGroup(int group) override;
68 bool IsGroupFocusTraversable() const override; 68 bool IsGroupFocusTraversable() const override;
69 void OnPaint(gfx::Canvas* canvas) override; 69 void OnPaint(gfx::Canvas* canvas) override;
70 void OnFocus() override; 70 void OnFocus() override;
71 void OnBlur() override; 71 void OnBlur() override;
72 bool OnMousePressed(const ui::MouseEvent& event) override; 72 bool OnMousePressed(const ui::MouseEvent& event) override;
73 void OnMouseEntered(const ui::MouseEvent& event) override;
74 void OnMouseExited(const ui::MouseEvent& event) override;
75 void OnGestureEvent(ui::GestureEvent* event) override; 73 void OnGestureEvent(ui::GestureEvent* event) override;
76 void GetAccessibleState(ui::AXViewState* state) override; 74 void GetAccessibleState(ui::AXViewState* state) override;
77 static const char* kDesktopMediaSourceViewClassName; 75 static const char* kDesktopMediaSourceViewClassName;
78 76
79 private: 77 private:
80 // Updates selection state of the element. If |selected| is true then also 78 // Updates selection state of the element. If |selected| is true then also
81 // calls SetSelected(false) for the source view that was selected before that 79 // calls SetSelected(false) for the source view that was selected before that
82 // (if any). 80 // (if any).
83 void SetSelected(bool selected); 81 void SetSelected(bool selected);
84 82
85 // Updates hover state of the element, and the appearance. 83 // Updates hover state of the element, and the appearance.
86 void SetHovered(bool hovered); 84 void SetHovered(bool hovered);
87 85
88 DesktopMediaListView* parent_; 86 DesktopMediaListView* parent_;
89 content::DesktopMediaID source_id_; 87 content::DesktopMediaID source_id_;
90 88
91 DesktopMediaSourceViewStyle style_; 89 DesktopMediaSourceViewStyle style_;
92 views::ImageView* image_view_; 90 views::ImageView* image_view_;
93 views::Label* label_; 91 views::Label* label_;
94 92
95 bool selected_; 93 bool selected_;
96 94
97 DISALLOW_COPY_AND_ASSIGN(DesktopMediaSourceView); 95 DISALLOW_COPY_AND_ASSIGN(DesktopMediaSourceView);
98 }; 96 };
99 97
100 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_ 98 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698