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

Unified Diff: ash/system/user/button_from_view.h

Issue 2099793002: mash: Migrate some system user files to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 4 years, 6 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
Index: ash/system/user/button_from_view.h
diff --git a/ash/system/user/button_from_view.h b/ash/system/user/button_from_view.h
deleted file mode 100644
index fb39b505780f3b9d09063808a7946b4641e0a9c8..0000000000000000000000000000000000000000
--- a/ash/system/user/button_from_view.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_SYSTEM_USER_BUTTON_FROM_VIEW_H_
-#define ASH_SYSTEM_USER_BUTTON_FROM_VIEW_H_
-
-#include "base/macros.h"
-#include "ui/gfx/geometry/insets.h"
-#include "ui/views/controls/button/custom_button.h"
-
-namespace ash {
-namespace tray {
-
-// This view is used to wrap it's content and transform it into button.
-class ButtonFromView : public views::CustomButton {
- public:
- // The |content| is the content which is shown within the button. The
- // |button_listener| will be informed - if provided - when a button was
- // pressed. If |highlight_on_hover| is set to true, the button will be
- // highlighted upon hover and show the accessibility caret.
- // The |tab_frame_inset| will be used to inset the blue tab frame inside the
- // button.
- // An accessible label gets computed based upon descendant views of this view.
- ButtonFromView(views::View* content,
- views::ButtonListener* listener,
- bool highlight_on_hover,
- const gfx::Insets& tab_frame_inset);
- ~ButtonFromView() override;
-
- // Called when the border should remain even in the non highlighted state.
- void ForceBorderVisible(bool show);
-
- // Overridden from views::View
- void OnMouseEntered(const ui::MouseEvent& event) override;
- void OnMouseExited(const ui::MouseEvent& event) override;
- void OnPaint(gfx::Canvas* canvas) override;
- void OnFocus() override;
- void OnBlur() override;
- void GetAccessibleState(ui::AXViewState* state) override;
-
- // Check if the item is hovered.
- bool is_hovered_for_test() { return button_hovered_; }
-
- private:
- // Change the hover/active state of the "button" when the status changes.
- void ShowActive();
-
- // Content of button.
- views::View* content_;
-
- // Whether button should be highligthed on hover.
- bool highlight_on_hover_;
-
- // True if button is hovered.
- bool button_hovered_;
-
- // True if the border should be always visible.
- bool show_border_;
-
- // The insets which get used for the drawn accessibility (tab) frame.
- gfx::Insets tab_frame_inset_;
-
- DISALLOW_COPY_AND_ASSIGN(ButtonFromView);
-};
-
-} // namespace tray
-} // namespace ash
-
-#endif // ASH_SYSTEM_USER_BUTTON_FROM_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698