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

Unified Diff: chrome/browser/ui/views/desktop_capture/desktop_media_source_view.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/desktop_capture/desktop_media_source_view.cc
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.cc
index 601f3aaa918a8064353cde0ee6b484cb34a22ac6..171792b2d04ec3cbe5f414c3dda7a8c334c96424 100644
--- a/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.cc
+++ b/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.cc
@@ -10,7 +10,6 @@
#include "ui/accessibility/ax_view_state.h"
#include "ui/gfx/canvas.h"
#include "ui/native_theme/native_theme.h"
-#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
@@ -95,7 +94,7 @@ void DesktopMediaSourceView::SetSelected(bool selected) {
}
const SkColor border_color = GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
+ ui::NativeTheme::kColorId_FocusedBorderColor);
image_view_->SetBorder(views::Border::CreateSolidBorder(
style_.selection_border_thickness, border_color));
label_->SetFontList(label_->font_list().Derive(0, gfx::Font::NORMAL,
@@ -110,19 +109,6 @@ void DesktopMediaSourceView::SetSelected(bool selected) {
SchedulePaint();
}
-void DesktopMediaSourceView::SetHovered(bool hovered) {
- if (hovered) {
- // Use background color to show mouse hover.
- const SkColor bg_color = GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor);
- set_background(views::Background::CreateSolidBackground(bg_color));
- } else {
- set_background(nullptr);
- }
-
- SchedulePaint();
-}
-
const char* DesktopMediaSourceView::GetClassName() const {
return DesktopMediaSourceView::kDesktopMediaSourceViewClassName;
}
@@ -132,7 +118,7 @@ void DesktopMediaSourceView::SetStyle(DesktopMediaSourceViewStyle style) {
image_view_->SetBoundsRect(style_.image_rect);
if (selected_) {
const SkColor border_color = GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
+ ui::NativeTheme::kColorId_FocusedBorderColor);
image_view_->SetBorder(views::Border::CreateSolidBorder(
style_.selection_border_thickness, border_color));
}
@@ -196,14 +182,6 @@ bool DesktopMediaSourceView::OnMousePressed(const ui::MouseEvent& event) {
return true;
}
-void DesktopMediaSourceView::OnMouseEntered(const ui::MouseEvent& event) {
- SetHovered(true);
-}
-
-void DesktopMediaSourceView::OnMouseExited(const ui::MouseEvent& event) {
- SetHovered(false);
-}
-
void DesktopMediaSourceView::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_TAP &&
event->details().tap_count() == 2) {
« no previous file with comments | « chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698