Commit a18cb649 authored by Dave Schuyler's avatar Dave Schuyler Committed by Commit Bot

[Views] fix comment about scaling.

This CL fixes a comment about scaling. In the process of making that
several presub/lint adjustments were also made.

(code health)

Bug: None
Change-Id: I29b2f8ad2260aa303be22135248978f97ff5abc8
Reviewed-on: https://chromium-review.googlesource.com/889990Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533052}
parent 4ef8aa85
This diff is collapsed.
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <memory> #include <memory>
#include <set> #include <set>
#include <string> #include <string>
#include <utility>
#include <vector> #include <vector>
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
...@@ -52,7 +53,7 @@ class Canvas; ...@@ -52,7 +53,7 @@ class Canvas;
class Insets; class Insets;
class Path; class Path;
class Transform; class Transform;
} } // namespace gfx
namespace ui { namespace ui {
struct AXActionData; struct AXActionData;
...@@ -64,7 +65,7 @@ class NativeTheme; ...@@ -64,7 +65,7 @@ class NativeTheme;
class PaintContext; class PaintContext;
class ThemeProvider; class ThemeProvider;
class TransformRecorder; class TransformRecorder;
} } // namespace ui
namespace views { namespace views {
...@@ -86,7 +87,7 @@ class PreEventDispatchHandler; ...@@ -86,7 +87,7 @@ class PreEventDispatchHandler;
class PostEventDispatchHandler; class PostEventDispatchHandler;
class RootView; class RootView;
class ScopedChildrenLock; class ScopedChildrenLock;
} } // namespace internal
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
...@@ -318,7 +319,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, ...@@ -318,7 +319,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// position accessors. // position accessors.
// Transformations are not applied on the size/position. For example, if // Transformations are not applied on the size/position. For example, if
// bounds is (0, 0, 100, 100) and it is scaled by 0.5 along the X axis, the // bounds is (0, 0, 100, 100) and it is scaled by 0.5 along the X axis, the
// width will still be 100 (although when painted, it will be 50x50, painted // width will still be 100 (although when painted, it will be 50x100, painted
// at location (0, 0)). // at location (0, 0)).
void SetBounds(int x, int y, int width, int height); void SetBounds(int x, int y, int width, int height);
...@@ -539,7 +540,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, ...@@ -539,7 +540,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Return the receiving view's class name. A view class is a string which // Return the receiving view's class name. A view class is a string which
// uniquely identifies the view class. It is intended to be used as a way to // uniquely identifies the view class. It is intended to be used as a way to
// find out during run time if a view can be safely casted to a specific view // find out during run time if a view can be safely cast to a specific view
// subclass. The default implementation returns kViewClassName. // subclass. The default implementation returns kViewClassName.
virtual const char* GetClassName() const; virtual const char* GetClassName() const;
...@@ -750,7 +751,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, ...@@ -750,7 +751,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// The provided event is in the receiver's coordinate system. // The provided event is in the receiver's coordinate system.
// //
// Return true if you processed the event and want to receive subsequent // Return true if you processed the event and want to receive subsequent
// MouseDraggged and MouseReleased events. This also stops the event from // MouseDragged and MouseReleased events. This also stops the event from
// bubbling. If you return false, the event will bubble through parent // bubbling. If you return false, the event will bubble through parent
// views. // views.
// //
...@@ -825,7 +826,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, ...@@ -825,7 +826,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
virtual void SetMouseHandler(View* new_mouse_handler); virtual void SetMouseHandler(View* new_mouse_handler);
// Invoked when a key is pressed or released. // Invoked when a key is pressed or released.
// Subclasser should return true if the event has been processed and false // Subclasses should return true if the event has been processed and false
// otherwise. If the event has not been processed, the parent will be given a // otherwise. If the event has not been processed, the parent will be given a
// chance. // chance.
virtual bool OnKeyPressed(const ui::KeyEvent& event); virtual bool OnKeyPressed(const ui::KeyEvent& event);
...@@ -1004,7 +1005,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, ...@@ -1004,7 +1005,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Provides default implementation for context menu handling. The default // Provides default implementation for context menu handling. The default
// implementation calls the ShowContextMenu of the current // implementation calls the ShowContextMenu of the current
// ContextMenuController (if it is not NULL). Overridden in subclassed views // ContextMenuController (if it is not NULL). Overridden in subclassed views
// to provide right-click menu display triggerd by the keyboard (i.e. for the // to provide right-click menu display triggered by the keyboard (i.e. for the
// Chrome toolbar Back and Forward buttons). No source needs to be specified, // Chrome toolbar Back and Forward buttons). No source needs to be specified,
// as it is always equal to the current View. // as it is always equal to the current View.
virtual void ShowContextMenu(const gfx::Point& p, virtual void ShowContextMenu(const gfx::Point& p,
...@@ -1138,7 +1139,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, ...@@ -1138,7 +1139,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// The following methods are used by ScrollView to determine the amount // The following methods are used by ScrollView to determine the amount
// to scroll relative to the visible bounds of the view. For example, a // to scroll relative to the visible bounds of the view. For example, a
// return value of 10 indicates the scrollview should scroll 10 pixels in // return value of 10 indicates the scroll_view should scroll 10 pixels in
// the appropriate direction. // the appropriate direction.
// //
// Each method takes the following parameters: // Each method takes the following parameters:
...@@ -1442,7 +1443,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, ...@@ -1442,7 +1443,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
bool ShouldPaint() const; bool ShouldPaint() const;
// Adjusts the transform of |recorder| in advance of painting. // Adjusts the transform of |recorder| in advance of painting.
void SetupTransformRecorderForPainting( void SetUpTransformRecorderForPainting(
const gfx::Vector2d& offset_from_parent, const gfx::Vector2d& offset_from_parent,
ui::TransformRecorder* recorder) const; ui::TransformRecorder* recorder) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment