summaryrefslogtreecommitdiffstats
path: root/views
Commit message (Collapse)AuthorAgeFilesLines
* Remove "visible bounds in root changed" functions from RootView, move them ↵ben@chromium.org2011-02-167-119/+160
| | | | | | | | | | | | | to View. Clean up the API a little. Adds a BoundsChanged() processing function to View that does default processing for bounds-changed events, including notifying the view via OnBoundsChanged() and potentially notifying of visible bounds changing. Adds a unit test for OnVisibleBoundsChanged. http://crbug.com/72040 TEST=unit test Review URL: http://codereview.chromium.org/6534001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75182 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SkRectToRect.sadrul@chromium.org2011-02-161-5/+1
| | | | | | | | | BUG=none TEST=RectTest.SkRectToRect Review URL: http://codereview.chromium.org/6525031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75159 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ProcessPaint to Paint()ben@chromium.org2011-02-1611-80/+88
| | | | | | | | | | | | Make OnPaint* methods protected. http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6529037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75063 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Paint* -> OnPaint*ben@chromium.org2011-02-1650-102/+96
| | | | | | | | | http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6499030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75033 0039d316-1c4b-4281-b951-d872f2087c98
* views transformation: First cut.sadrul@chromium.org2011-02-154-6/+179
| | | | | | | | | | | This is a first cut at the transformable views. Skia transformation matrices are used to apply transformation (rotate, scale, translation). Support for clipping is also added (but not through the matrix). Currently, the transformation is applied only for painting. A future CL will apply the transformation for various events. BUG=none TEST=ViewTest.TransformPaint Review URL: http://codereview.chromium.org/6500008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75023 0039d316-1c4b-4281-b951-d872f2087c98
* Sort methods in RootView cc/h. Add better documentation and outline future ↵ben@chromium.org2011-02-152-556/+529
| | | | | | | | | | | | plans. http://crbug.com/72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6525024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75018 0039d316-1c4b-4281-b951-d872f2087c98
* Rename SchedulePaint(gfx::Rect..) to SchedulePaintInRectben@chromium.org2011-02-1513-25/+24
| | | | | | | | | http://crbug.com/72040 TEST=existing tests Review URL: http://codereview.chromium.org/6480076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74987 0039d316-1c4b-4281-b951-d872f2087c98
* NOTREACHED() was hit due to not handling WM_CHAR in EventTypeFromNative(). ↵ben@chromium.org2011-02-151-0/+1
| | | | | | | | | | | WM_CHAR is a translated WM_KEYDOWN, so we map it to ui::ET_KEY_PRESSED http://crbug.com/73006 TEST=see bug Review URL: http://codereview.chromium.org/6528018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74967 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete dependencies that create needless recompiling.jeanluc@chromium.org2011-02-151-2/+0
| | | | | | | | | BUG=71130 Review URL: http://codereview.chromium.org/6523009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74966 0039d316-1c4b-4281-b951-d872f2087c98
* Begin implementing a new widget.ben@chromium.org2011-02-1511-124/+1563
| | | | | | | | | | | This brings over code from ui/views, and bandaids it into compiling with the existing RootView/Widget interface. It compiles but probably doesn't run, which is OK since no one uses it. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6523008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74915 0039d316-1c4b-4281-b951-d872f2087c98
* fix bustage'ben@chromium.org2011-02-143-0/+2099
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74851 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 74693. Changing approach.ben@chromium.org2011-02-1416-2184/+74
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74849 0039d316-1c4b-4281-b951-d872f2087c98
* Removing the experimental Chrome extension popup API. This API will not be ↵twiz@chromium.org2011-02-141-1/+1
| | | | | | | | | | | | | | | | | | added to the set of available extension APIs. I also removed some of the plumbing associated with the popup api: - Drop-shadow support removed from BrowserBubble. This had only been supported on Windows. - Removed the ExtensionPopup::PopupChrome type. Only popups from the popup API supported rectangle chrome. - Removed the activate-on-show parameter from ExtensionPopup. This was only used for the popup API. All popups activate on show, by default. - Removed the AddRef/Release magic from ExtensionPopup. The API required these semantics because of the complex, asynchronous lifetime management required by the popup API. See ExtensionPopup::Observer::ExtensionPopupClosed. - Removed unneeded methods from ExtensionPopup::Observer, and ExtensionFunctionDispatcher::Delegate. BUG=None TEST=None Review URL: http://codereview.chromium.org/6334101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74835 0039d316-1c4b-4281-b951-d872f2087c98
* Fix small incompatibility issues with Visual Studio 2010.jeanluc@chromium.org2011-02-141-9/+27
| | | | | | | | | BUG=25628 TEST=Compile all.sln cleanly Review URL: http://codereview.chromium.org/6512012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74778 0039d316-1c4b-4281-b951-d872f2087c98
* Carnitas: Delete stub src/gfx/* headerssail@chromium.org2011-02-132-2/+1
| | | | | | | | | | | The last references to src/gfx/* have been updated so it's safe to delete the stub headers. BUG=None TEST=None Review URL: http://codereview.chromium.org/6474031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74741 0039d316-1c4b-4281-b951-d872f2087c98
* Add input method support for views and integrate ibus input frameworkoshima@google.com2011-02-124-0/+739
| | | | | | | | | | | BUG=none TEST=tested on Linux desktop oshima landed for penghuang Review URL: http://codereview.chromium.org/6480036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74709 0039d316-1c4b-4281-b951-d872f2087c98
* Add stub WidgetImpl class. This will become the cross platform replacement ↵ben@chromium.org2011-02-125-0/+457
| | | | | | | | | | | | | | | | | for Widget, and will merge the common functionality between NativeWidgetWin and WidgetGtk. Right now it does nothing other than implement Widget (for compatibility) and the new NativeWidgetListener interface, imported from ui/views/widget. This new interface is the NativeWidget's way of notifying the Widget of events. Also bring across the NativeWidget interface from ui/views/widget, which will be implemented by NativeWidgetWin in a future changelist. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6510008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74708 0039d316-1c4b-4281-b951-d872f2087c98
* Add --debug-views-paint switch that shows damaged rectangles in redoshima@google.com2011-02-123-0/+31
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6489015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74706 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Widgetwin->NativeWidgetWinben@chromium.org2011-02-1116-282/+291
| | | | | | | | | BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6510001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74693 0039d316-1c4b-4281-b951-d872f2087c98
* Fix MenuClosed on views+gtkpiman@google.com2011-02-111-0/+2
| | | | | | | | | | | | This is necessary to get context menus working in Pepper. MenuClosed is called on views+win and native gtk, so this seems like the right thing to do. BUG=none TEST=Ran Pepper Flash on a Chrome OS build, made sure context menus work Review URL: http://codereview.chromium.org/6250098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74666 0039d316-1c4b-4281-b951-d872f2087c98
* Safer KeyEvent construction using synthetic MSGs.ben@chromium.org2011-02-112-17/+31
| | | | | | | | | | | After talking to jar, it seems impossible to reliably get a reasonable MSG from Windows given native nested message loops etc. So I am making this do what my prototype did and just generate a synthetic MSG from the information supplied to the WndProc. It turns out this is what ATL does too for its GetCurrentMessage implementation. BUG=none TEST=none Review URL: http://codereview.chromium.org/6500003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74654 0039d316-1c4b-4281-b951-d872f2087c98
* Fix views_unittests. It turns out it wasn't safe to register the observer ↵ben@chromium.org2011-02-112-34/+5
| | | | | | | | | | | | from the place it was being registered in all cases, so I am moving the message tracking to use the existing widget message loop observer which is added post-window-create. Need to talk to jar/darin about exposing this functionality on MessageLoop. BUG=none TEST=views_unittests passes TBR=sky Review URL: http://codereview.chromium.org/6474042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74626 0039d316-1c4b-4281-b951-d872f2087c98
* touch: Fix build after NativeEvent2 change.sadrul@chromium.org2011-02-112-4/+6
| | | | | | TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74619 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability to construct a KeyEvent from a NativeEvent[2], and converts ↵ben@chromium.org2011-02-1123-167/+430
| | | | | | | | | | | | | some code to use it. Removes some of the Windows-specific stuff from KeyEvent. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6487002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74614 0039d316-1c4b-4281-b951-d872f2087c98
* Use DispatchX for dispatching X events.sadrul@chromium.org2011-02-116-11/+11
| | | | | | | | | | This fixes an error clang shows with -Woverloaded-virtual. BUG=72575 TEST=none Review URL: http://codereview.chromium.org/6487004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74595 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor TOUCH_UI to match other refactor.backer@chromium.org2011-02-114-18/+21
| | | | | | | | | | | A few files were missed in a previous refactor (http://codereview.chromium.org/6480001/). BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6488006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74568 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move more layout constants to the views namespace. Part 3.tfarina@chromium.org2011-02-102-12/+12
| | | | | | | | | | | The other constants will be moved in future patches. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6480016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74522 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 74518 - Refactor TOUCH_UI to match other refactor.backer@chromium.org2011-02-104-21/+18
| | | | | | | | | | | | | | A few files were missed in a previous refactor (http://codereview.chromium.org/6480001/). BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6488006 TBR=backer@chromium.org Review URL: http://codereview.chromium.org/6488012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74520 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor TOUCH_UI to match other refactor.backer@chromium.org2011-02-104-18/+21
| | | | | | | | | | | A few files were missed in a previous refactor (http://codereview.chromium.org/6480001/). BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6488006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74518 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate Event API methods to Google Style.ben@chromium.org2011-02-1042-377/+321
| | | | | | | | | | | | | | Re-landing, moving the bits Mac uses to ui/base/events.h BUG=72040 TEST=none TBR=sky Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74377 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74408 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 74377 - Migrate Event API methods to Google Style.ben@chromium.org2011-02-0920-136/+153
| | | | | | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6480001 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/6469014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74379 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate Event API methods to Google Style.ben@chromium.org2011-02-0920-153/+136
| | | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6480001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74377 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move more layout constants to the views namespace. Part 2.tfarina@chromium.org2011-02-092-15/+15
| | | | | | | | | | | The other constants will be moved in future patches. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6458014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74372 0039d316-1c4b-4281-b951-d872f2087c98
* Fix submenu arrow position for RTLoshima@google.com2011-02-094-17/+44
| | | | | | | | | | | | | Flip the direction of submenu arrow for RTL BUG=chromium-os:5593 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74171 Review URL: http://codereview.chromium.org/6428001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74324 0039d316-1c4b-4281-b951-d872f2087c98
* Move Event files into views/eventsben@chromium.org2011-02-0920-25/+25
| | | | | | | | | | BUG=none TEST=none TBR=sky Review URL: http://codereview.chromium.org/6459024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74305 0039d316-1c4b-4281-b951-d872f2087c98
* touch: Fix compile after views API changes, and remove some dead code.sadrul@chromium.org2011-02-092-13/+0
| | | | | | | | BUG=none TEST=none TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74255 0039d316-1c4b-4281-b951-d872f2087c98
* fix bustageben@chromium.org2011-02-091-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74246 0039d316-1c4b-4281-b951-d872f2087c98
* Rework tree APIs to reflect Google style and more const-correctness.Also, ↵ben@chromium.org2011-02-0935-395/+402
| | | | | | | | | | | move PrintViewHierarchy/PrintFocusHierarchy out into a separate header. BUG=72040 TEST=None Review URL: http://codereview.chromium.org/6452011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74244 0039d316-1c4b-4281-b951-d872f2087c98
* It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ↵ben@chromium.org2011-02-0915-18/+18
| | | | | | | | | | | | | | invert everything. This fixes the painting bugs in the omnibox and bookmark bar, and probably countless other glitches in rendering. BUG=none TEST=omnibox popup should render properly TBR=sky Review URL: http://codereview.chromium.org/6462022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74231 0039d316-1c4b-4281-b951-d872f2087c98
* Make linux MouseWheelEvent consistent with win.xiyuan@chromium.org2011-02-084-7/+8
| | | | | | | | | | | Also reverted SubmenuView scroll direction change in r73996. BUG=chromium:72320 TEST=Views scroll should be consistent on all platforms per chromium:72320 Review URL: http://codereview.chromium.org/6453008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74195 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix submenu arrow position for RTL"oshima@google.com2011-02-084-43/+16
| | | | | | | | | | | | | This reverts commit 37d4bc610b675ab94dd1d696fbdd474cbfc46208. TBR=dmazzoni@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/6462006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74173 0039d316-1c4b-4281-b951-d872f2087c98
* Fix submenu arrow position for RTLoshima@google.com2011-02-084-16/+43
| | | | | | | | | | | Flip the direction of submenu arrow for RTL BUG=chromium-os:5593 TEST=none Review URL: http://codereview.chromium.org/6428001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74171 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes possible crash in confirm dialog. If you press and hold space,sky@chromium.org2011-02-085-21/+27
| | | | | | | | | | | | | | then press escape (with space still down) and release we end up notifying the delegate twice. The first the time the delegate is notified causes some action so that the second time through we end up crashing (delegate deleted). The fix is to only notify delegate once. BUG=71940 TEST=see bug Review URL: http://codereview.chromium.org/6429001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74131 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up RTL methods.ben@chromium.org2011-02-0811-110/+58
| | | | | | | | | | | | | | No one used the non-RTL version of GetBounds(), so I renamed it GetMirroredBounds() and got rid of the enum. Same for GetX(), consolidated with MirroredX() into GetMirroredX(). GetPosition() already took into account mirroring, so renamed GetMirroredPosition() for symmetry. Renamed the other functions to be getters. De-inlined a few that were doing complex looking stuff. http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6334152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74087 0039d316-1c4b-4281-b951-d872f2087c98
* touch: Fix wheel scrolling for xinput2.sadrul@google.com2011-02-082-2/+22
| | | | | | | | | BUG=wheel scrolling doesn't work TEST=wheel scrolling scrolls the page when possible Review URL: http://codereview.chromium.org/6250195 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74076 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move more layout constants to the views namespace.tfarina@chromium.org2011-02-081-5/+5
| | | | | | | | | | | The other constants will be moved in future patches. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6250186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74074 0039d316-1c4b-4281-b951-d872f2087c98
* Rework basic bounds methods on View to match new V2 API: ben@chromium.org2011-02-0843-211/+195
| | | | | | | | | | | | | | | | SetBounds(const gfx::Rect& rect) -> SetBoundsRect(); DidChangeBounds()->OnBoundsChanged() GetLocalBounds(false)->GetLocalBounds() GetLocalBounds(true)->GetContentsBounds() Moved GetBounds(), GetX(), and GetPosition into RTL section. http://crbug.com/72040 TEST=none Review URL: http://codereview.chromium.org/6410109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74052 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move the implementation of WidgetExample to the source file.tfarina@chromium.org2011-02-073-150/+199
| | | | | | | | | BUG=None TEST=run out/Debug/views_examples, everything should works as before. Review URL: http://codereview.chromium.org/6368122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74041 0039d316-1c4b-4281-b951-d872f2087c98
* Build fix.evan@chromium.org2011-02-071-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74023 0039d316-1c4b-4281-b951-d872f2087c98
* Make mouse wheel scrolling in views menu smoother.xiyuan@chromium.org2011-02-075-3/+17
| | | | | | | | | | | | | | | Mouse wheel scrolling eventually calls each MenuItemView's GetPreferredSize for every row moved. This change added a preferred size cache to make it more efficient. Also flipped scroll direction to be consistent with the scrolling direction in other places. BUG=chromium-os:11057 TEST=Verify mouse wheel scrolling is smooth per chromium-os:11057. Review URL: http://codereview.chromium.org/6368105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73996 0039d316-1c4b-4281-b951-d872f2087c98