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

Unified Diff: ui/views/controls/link.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 | « ui/views/controls/label_unittest.cc ('k') | ui/views/controls/link.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/link.h
diff --git a/ui/views/controls/link.h b/ui/views/controls/link.h
deleted file mode 100644
index 951de2d1117b0d15a8cf20fb46bb4c8b2256710e..0000000000000000000000000000000000000000
--- a/ui/views/controls/link.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2012 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 UI_VIEWS_CONTROLS_LINK_H_
-#define UI_VIEWS_CONTROLS_LINK_H_
-
-#include <string>
-
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/views/controls/label.h"
-
-namespace views {
-
-class LinkListener;
-
-////////////////////////////////////////////////////////////////////////////////
-//
-// Link class
-//
-// A Link is a label subclass that looks like an HTML link. It has a
-// controller which is notified when a click occurs.
-//
-////////////////////////////////////////////////////////////////////////////////
-class VIEWS_EXPORT Link : public Label {
- public:
- Link();
- explicit Link(const base::string16& title);
- virtual ~Link();
-
- static SkColor GetDefaultEnabledColor();
-
- const LinkListener* listener() { return listener_; }
- void set_listener(LinkListener* listener) { listener_ = listener; }
-
- // Label:
- virtual const char* GetClassName() const override;
- virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
- virtual bool CanProcessEventsWithinSubtree() const override;
- virtual bool OnMousePressed(const ui::MouseEvent& event) override;
- virtual bool OnMouseDragged(const ui::MouseEvent& event) override;
- virtual void OnMouseReleased(const ui::MouseEvent& event) override;
- virtual void OnMouseCaptureLost() override;
- virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
- virtual void OnGestureEvent(ui::GestureEvent* event) override;
- virtual bool SkipDefaultKeyEventProcessing(
- const ui::KeyEvent& event) override;
- virtual void GetAccessibleState(ui::AXViewState* state) override;
- virtual void OnEnabledChanged() override;
- virtual void OnFocus() override;
- virtual void OnBlur() override;
- virtual void SetFontList(const gfx::FontList& font_list) override;
- virtual void SetText(const base::string16& text) override;
- virtual void SetEnabledColor(SkColor color) override;
-
- void SetPressedColor(SkColor color);
- void SetUnderline(bool underline);
-
- static const char kViewClassName[];
-
- private:
- void Init();
-
- void SetPressed(bool pressed);
-
- void RecalculateFont();
-
- LinkListener* listener_;
-
- // Whether the link should be underlined when enabled.
- bool underline_;
-
- // Whether the link is currently pressed.
- bool pressed_;
-
- // The color when the link is neither pressed nor disabled.
- SkColor requested_enabled_color_;
-
- // The color when the link is pressed.
- SkColor requested_pressed_color_;
-
- DISALLOW_COPY_AND_ASSIGN(Link);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_CONTROLS_LINK_H_
« no previous file with comments | « ui/views/controls/label_unittest.cc ('k') | ui/views/controls/link.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698