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

Unified Diff: ash/system/tray/actionable_view.h

Issue 2066583004: mash: Move most files in //ash/system/tray to //ash/common/system/tray (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trayupdatemove
Patch Set: rebase 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
« no previous file with comments | « ash/system/ime/tray_ime_chromeos.cc ('k') | ash/system/tray/actionable_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/actionable_view.h
diff --git a/ash/system/tray/actionable_view.h b/ash/system/tray/actionable_view.h
deleted file mode 100644
index aff5e769d6d95219b1162a9fd08f7a27e244d094..0000000000000000000000000000000000000000
--- a/ash/system/tray/actionable_view.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 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_TRAY_ACTIONABLE_VIEW_H_
-#define ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
-
-#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "ui/views/view.h"
-
-namespace ash {
-
-// A focusable view that performs an action when user clicks on it, or presses
-// enter or space when focused. Note that the action is triggered on mouse-up,
-// instead of on mouse-down. So if user presses the mouse on the view, then
-// moves the mouse out of the view and then releases, then the action will not
-// be performed.
-// Exported for SystemTray.
-class ASH_EXPORT ActionableView : public views::View {
- public:
- static const char kViewClassName[];
-
- ActionableView();
-
- ~ActionableView() override;
-
- void SetAccessibleName(const base::string16& name);
- const base::string16& accessible_name() const { return accessible_name_; }
-
- protected:
- void OnPaintFocus(gfx::Canvas* canvas);
-
- // Returns the bounds to paint the focus rectangle in.
- virtual gfx::Rect GetFocusBounds();
-
- // Performs an action when user clicks on the view (on mouse-press event), or
- // presses a key when this view is in focus. Returns true if the event has
- // been handled and an action was performed. Returns false otherwise.
- virtual bool PerformAction(const ui::Event& event) = 0;
-
- // Overridden from views::View.
- const char* GetClassName() const override;
- bool OnKeyPressed(const ui::KeyEvent& event) override;
- bool OnMousePressed(const ui::MouseEvent& event) override;
- void OnMouseReleased(const ui::MouseEvent& event) override;
- void OnMouseCaptureLost() override;
- void GetAccessibleState(ui::AXViewState* state) override;
- void OnPaint(gfx::Canvas* canvas) override;
- void OnFocus() override;
- void OnBlur() override;
-
- // Overridden from ui::EventHandler.
- void OnGestureEvent(ui::GestureEvent* event) override;
-
- private:
- base::string16 accessible_name_;
- bool has_capture_;
-
- DISALLOW_COPY_AND_ASSIGN(ActionableView);
-};
-
-} // namespace ash
-
-#endif // ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
« no previous file with comments | « ash/system/ime/tray_ime_chromeos.cc ('k') | ash/system/tray/actionable_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698