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

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

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 9 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 | « ash/common/system/update/tray_update_unittest.cc ('k') | ash/common/system/user/button_from_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/button_from_view.h
diff --git a/ash/common/system/user/button_from_view.h b/ash/common/system/user/button_from_view.h
deleted file mode 100644
index 9a0ec25ca88705041792b0d77349285d0e085b29..0000000000000000000000000000000000000000
--- a/ash/common/system/user/button_from_view.h
+++ /dev/null
@@ -1,76 +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_COMMON_SYSTEM_USER_BUTTON_FROM_VIEW_H_
-#define ASH_COMMON_SYSTEM_USER_BUTTON_FROM_VIEW_H_
-
-#include <memory>
-
-#include "ash/common/system/tray/tray_popup_ink_drop_style.h"
-#include "base/macros.h"
-#include "ui/views/controls/button/custom_button.h"
-
-namespace views {
-class InkDropContainerView;
-} // namespace views
-
-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.
- ButtonFromView(views::View* content,
- views::ButtonListener* listener,
- TrayPopupInkDropStyle ink_drop_style);
- ~ButtonFromView() override;
-
- // 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 GetAccessibleNodeData(ui::AXNodeData* node_data) override;
- void Layout() override;
-
- // Check if the item is hovered.
- bool is_hovered_for_test() { return button_hovered_; }
-
- protected:
- // views::CustomButton:
- void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
- void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
- std::unique_ptr<views::InkDrop> CreateInkDrop() override;
- std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
- std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
- const override;
- std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override;
-
- private:
- // Content of button.
- views::View* content_;
-
- // Defines the flavor of ink drop ripple/highlight that should be constructed.
- TrayPopupInkDropStyle ink_drop_style_;
-
- // True if button is hovered.
- bool button_hovered_;
-
- // A separate view is necessary to hold the ink drop layer so that |this| can
- // host labels with subpixel anti-aliasing enabled.
- views::InkDropContainerView* ink_drop_container_;
-
- std::unique_ptr<views::InkDropMask> ink_drop_mask_;
-
- DISALLOW_COPY_AND_ASSIGN(ButtonFromView);
-};
-
-} // namespace tray
-} // namespace ash
-
-#endif // ASH_COMMON_SYSTEM_USER_BUTTON_FROM_VIEW_H_
« no previous file with comments | « ash/common/system/update/tray_update_unittest.cc ('k') | ash/common/system/user/button_from_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698