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

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

Issue 2323913002: Desktop Capture Picker: More Clear Selection (Closed)
Patch Set: Remove include 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool is_selected() const { return selected_; } 75 bool is_selected() const { return selected_; }
76 76
77 // views::View interface. 77 // views::View interface.
78 const char* GetClassName() const override; 78 const char* GetClassName() const override;
79 views::View* GetSelectedViewForGroup(int group) override; 79 views::View* GetSelectedViewForGroup(int group) override;
80 bool IsGroupFocusTraversable() const override; 80 bool IsGroupFocusTraversable() const override;
81 void OnPaint(gfx::Canvas* canvas) override; 81 void OnPaint(gfx::Canvas* canvas) override;
82 void OnFocus() override; 82 void OnFocus() override;
83 void OnBlur() override; 83 void OnBlur() override;
84 bool OnMousePressed(const ui::MouseEvent& event) override; 84 bool OnMousePressed(const ui::MouseEvent& event) override;
85 void OnMouseEntered(const ui::MouseEvent& event) override;
86 void OnMouseExited(const ui::MouseEvent& event) override;
87 void OnGestureEvent(ui::GestureEvent* event) override; 85 void OnGestureEvent(ui::GestureEvent* event) override;
88 void GetAccessibleState(ui::AXViewState* state) override; 86 void GetAccessibleState(ui::AXViewState* state) override;
89 static const char* kDesktopMediaSourceViewClassName; 87 static const char* kDesktopMediaSourceViewClassName;
90 88
91 private: 89 private:
92 // Updates selection state of the element. If |selected| is true then also 90 // Updates selection state of the element. If |selected| is true then also
93 // calls SetSelected(false) for the source view that was selected before that 91 // calls SetSelected(false) for the source view that was selected before that
94 // (if any). 92 // (if any).
95 void SetSelected(bool selected); 93 void SetSelected(bool selected);
96 94
97 // Updates hover state of the element, and the appearance. 95 // Updates hover state of the element, and the appearance.
98 void SetHovered(bool hovered); 96 void SetHovered(bool hovered);
99 97
100 DesktopMediaListView* parent_; 98 DesktopMediaListView* parent_;
101 content::DesktopMediaID source_id_; 99 content::DesktopMediaID source_id_;
102 100
103 DesktopMediaSourceViewStyle style_; 101 DesktopMediaSourceViewStyle style_;
104 views::ImageView* icon_view_; 102 views::ImageView* icon_view_;
105 views::ImageView* image_view_; 103 views::ImageView* image_view_;
106 views::Label* label_; 104 views::Label* label_;
107 105
108 bool selected_; 106 bool selected_;
109 107
110 DISALLOW_COPY_AND_ASSIGN(DesktopMediaSourceView); 108 DISALLOW_COPY_AND_ASSIGN(DesktopMediaSourceView);
111 }; 109 };
112 110
113 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_ 111 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_DESKTOP_MEDIA_SOURCE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698