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

Unified Diff: views/controls/resize_area.h

Issue 3052011: Make the resize gripper invisible.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/views/extensions/extension_installed_bubble.cc ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/resize_area.h
===================================================================
--- views/controls/resize_area.h (revision 53545)
+++ views/controls/resize_area.h (working copy)
@@ -2,28 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef VIEWS_CONTROLS_RESIZE_GRIPPER_H_
-#define VIEWS_CONTROLS_RESIZE_GRIPPER_H_
+#ifndef VIEWS_CONTROLS_RESIZE_AREA_H_
+#define VIEWS_CONTROLS_RESIZE_AREA_H_
#include <string>
-#include "views/controls/image_view.h"
+#include "views/view.h"
namespace views {
////////////////////////////////////////////////////////////////////////////////
//
-// A simple resize gripper (two vertical bars).
+// An invisible area that acts like a horizontal resizer.
//
////////////////////////////////////////////////////////////////////////////////
-class ResizeGripper : public ImageView {
+class ResizeArea : public View {
public:
//////////////////////////////////////////////////////////////////////////////
//
// The interface needed for getting notified about the resize event.
//
//////////////////////////////////////////////////////////////////////////////
- class ResizeGripperDelegate {
+ class ResizeAreaDelegate {
public:
// OnResize is sent when resizing is detected. |resize_amount| specifies the
// number of pixels that the user wants to resize by, and can be negative or
@@ -36,15 +36,13 @@
static const char kViewClassName[];
- explicit ResizeGripper(ResizeGripperDelegate* delegate);
- virtual ~ResizeGripper();
+ explicit ResizeArea(ResizeAreaDelegate* delegate);
+ virtual ~ResizeArea();
// Overridden from views::View:
virtual std::string GetClassName() const;
virtual gfx::NativeCursor GetCursorForPoint(Event::EventType event_type,
const gfx::Point& p);
- virtual void OnMouseEntered(const views::MouseEvent& event);
- virtual void OnMouseExited(const views::MouseEvent& event);
virtual bool OnMousePressed(const views::MouseEvent& event);
virtual bool OnMouseDragged(const views::MouseEvent& event);
virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
@@ -55,22 +53,15 @@
// directionality.
void ReportResizeAmount(int resize_amount, bool last_update);
- // Changes the visibility of the gripper.
- void SetGripperVisible(bool visible);
-
// The delegate to notify when we have updates.
- ResizeGripperDelegate* delegate_;
+ ResizeAreaDelegate* delegate_;
// The mouse position at start (in screen coordinates).
int initial_position_;
- // Are we showing the resize gripper? We only show the resize gripper when
- // the mouse is over us.
- bool gripper_visible_;
-
- DISALLOW_COPY_AND_ASSIGN(ResizeGripper);
+ DISALLOW_COPY_AND_ASSIGN(ResizeArea);
};
} // namespace views
-#endif // VIEWS_CONTROLS_RESIZE_GRIPPER_H_
+#endif // VIEWS_CONTROLS_RESIZE_AREA_H_
« no previous file with comments | « chrome/browser/views/extensions/extension_installed_bubble.cc ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698