summaryrefslogtreecommitdiffstats
path: root/views
Commit message (Collapse)AuthorAgeFilesLines
* views: Add unittests for View::GetViewByID() method.tfarina@chromium.org2011-06-271-0/+38
| | | | | | | | | | | BUG=None TEST=views_unittests --gtest_filter=ViewTest.GetViewByID R=sky@chromium.org Review URL: http://codereview.chromium.org/7272003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90679 0039d316-1c4b-4281-b951-d872f2087c98
* A views only implementation of tooltips. In the views world, tooltips are drawnvarunjain@chromium.org2011-06-276-4/+303
| | | | | | | | | | | on top of the RootView using a transient decorator. BUG=none. TEST=none. Review URL: http://codereview.chromium.org/7115001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90675 0039d316-1c4b-4281-b951-d872f2087c98
* Fix checkbox in windows uninstaller.rogerta@chromium.org2011-06-273-7/+15
| | | | | | | | | | BUG=84791 TEST=Test the checkbox in the uninstaller as mentioned in the bug, but also all checkboxes in chrome too. Review URL: http://codereview.chromium.org/7196002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90640 0039d316-1c4b-4281-b951-d872f2087c98
* app: Get rid of test/ directory.tfarina@chromium.org2011-06-271-1/+1
| | | | | | | | | | | BUG=72317 TEST=None R=rsesek@chromium.org Review URL: http://codereview.chromium.org/7262013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90592 0039d316-1c4b-4281-b951-d872f2087c98
* Moves acclerated painting related fields from View to LayerHelper.sky@chromium.org2011-06-276-108/+302
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7242025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90589 0039d316-1c4b-4281-b951-d872f2087c98
* Fix virtual keyboard issue with login screen.penghuang@chromium.org2011-06-272-0/+5
| | | | | | | | | | | | | | | | http://codereview.chromium.org/7170018/ causes this problem. In CL 7170018, it will not create the input method until it is requested by a child view. So in that time, a child view may already be focused. So we need sync focus state with input method. BUG=Virtual keyboard does not work on Login screen TEST=Seaboard Review URL: http://codereview.chromium.org/7222007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90540 0039d316-1c4b-4281-b951-d872f2087c98
* Use NativeViewHostViews when using pure-views instead of NativeViewHostGtk.sadrul@chromium.org2011-06-261-1/+6
| | | | | | | | | | | This fixes a crash when running chrome with --use-pure-views --views-desktop BUG=none TEST=none Review URL: http://codereview.chromium.org/7263017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90520 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the glib message-pump, and use it as the base for a gtk message ↵sadrul@chromium.org2011-06-248-52/+39
| | | | | | | | | | | | | | | | | | | pump and an X message pump. The changes: * Rename MessagePumpGlibX to MessagePumpX. * Rename MessagePumpForUI to MessagePumpGlib. * Move some stuff out of MessagePumpGlib, and into MessagePumpGtk and MessagePumpX. * Rename MessagePumpForUI::Observer to MessageObserver, moved the platform-specific implementations into MessagePumpGtk and MessagePumpX. Ditto for MessagePumpForUI::Dispatcher. MessagePumpX is independent of MessagePumpGtk. At the moment, MessagePumpX does process some GDK event, but once we have a complete native_widget_x, we can take out the GDK processing and things should continue to work. BUG=none TEST=existing message-pump tests. Review URL: http://codereview.chromium.org/7250001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90418 0039d316-1c4b-4281-b951-d872f2087c98
* Add MenuItemView API to control menu repositioning.rhashimoto@chromium.org2011-06-243-9/+59
| | | | | | | | | | | | The use case for this is the ChromiumOS OOBE network menu. This menu is dynamic - access points may be added or removed while the menu is open so the number of items in the menu can change. At a certain threshold, the menu will "hop" between above and below the button. This CL provides a way to disable repositioning so the menu is always displayed below the button. BUG=chromium-os:16720 TEST=open OOBE network menu with a lot of WiFi access points around, check that the menu is drawn below the button Review URL: http://codereview.chromium.org/7217026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90410 0039d316-1c4b-4281-b951-d872f2087c98
* Allow View to have a layer whose texture is updated externally.backer@chromium.org2011-06-242-0/+42
| | | | | | | | | | | This will be used to display texture produced by the GPU process for the RWHVV via the browser compositor. BUG=none TEST=none Review URL: http://codereview.chromium.org/7231012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90362 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build when GYP_DEFINES="chromeos=0 use_ibus=1"hashimoto@chromium.org2011-06-241-7/+3
| | | | | | | | | BUG=NONE TEST=build success Review URL: http://codereview.chromium.org/7240007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90336 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where layer bounds weren't correctly set when views was setsky@chromium.org2011-06-242-11/+42
| | | | | | | | | | | | in a couple of cases. BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7247020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90333 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability to animate transforms/bounds to View.sky@chromium.org2011-06-239-12/+280
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7242005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90254 0039d316-1c4b-4281-b951-d872f2087c98
* Add an option to run Chrome in the views desktop.ben@chromium.org2011-06-234-43/+87
| | | | | | | | | | | | | | | - Add a BrowserFrameViews stub. - Add a NativeTabContentsViewViews stub. - Allow the omnibox to run in pure-views mode on Windows too. - Make the RenderWidgetHostViewViews build on Windows. chrome --use-pure-views --views-desktop runs, shows a browser window, but doesn't really do anything else. BUG=none TEST=none Review URL: http://codereview.chromium.org/7206055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90242 0039d316-1c4b-4281-b951-d872f2087c98
* views: Pull out ContextMenuController class into its own header file.tfarina@chromium.org2011-06-2312-44/+63
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7238006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90224 0039d316-1c4b-4281-b951-d872f2087c98
* Updated remaining button to text button. Reverted the interposedsaintlou@chromium.org2011-06-2316-159/+82
| | | | | | | | | | | class NativeButtonBase which is no longer needed. BUG=none TEST=none Review URL: http://codereview.chromium.org/7218035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90220 0039d316-1c4b-4281-b951-d872f2087c98
* views: Remove the dependency on app_base.tfarina@chromium.org2011-06-224-12/+4
| | | | | | | | | | | BUG=72317 TEST=views_unittests, views_desktop, views_examples R=sky@chromium.org,phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/7200022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90115 0039d316-1c4b-4281-b951-d872f2087c98
* xi2: We need to look at the slave device that generated the event,sadrul@chromium.org2011-06-221-1/+1
| | | | | | | | | | | instead of the master device to determine if we should process the event or not. BUG=none TEST=test that there is only one mousedown event for a mouseclick Review URL: http://codereview.chromium.org/7232022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90084 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up avatar icon drawingsail@chromium.org2011-06-221-1/+0
| | | | | | | | | | | | | This change addresses review feedback from: http://codereview.chromium.org/7003080/ BUG= TEST= Review URL: http://codereview.chromium.org/7229014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90072 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes leak in drag_utils.sky@chromium.org2011-06-221-4/+5
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org,tony@chromium.org Review URL: http://codereview.chromium.org/7215022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89975 0039d316-1c4b-4281-b951-d872f2087c98
* Fix building views_unittests.sadrul@chromium.org2011-06-221-0/+1
| | | | | | TBR=sky@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89954 0039d316-1c4b-4281-b951-d872f2087c98
* views/ime: Add dtor to CharacterComposer class to please clang.tfarina@chromium.org2011-06-222-2/+4
| | | | | | | | | | | BUG=None TEST=None R=rvargas@chromium.org, hashimoto@chromium.org Review URL: http://codereview.chromium.org/7233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89950 0039d316-1c4b-4281-b951-d872f2087c98
* Add character compositionhashimoto@chromium.org2011-06-227-70/+589
| | | | | | | | | | | Implemented character composition from key strokes starting with dead keys or compose key BUG=chromium-os:13882, chromium-os:15925 TEST= Review URL: http://codereview.chromium.org/6979023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89948 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "views: Refactor AddRemoveNotifications unittest."tfarina@chromium.org2011-06-221-102/+145
| | | | | | | | | | | | | | | | | | This removes the second definition of the ObserverView class, that was added by the merge conflict. This reverts commit 2a16ddfe7e09bec206daf6bdab3ef6d1a573dbfd. BUG=None TEST=views_unittests --gtest_filter=ViewTest.ViewHierarchyChanged TBR=sky@chromium.org Original Review URL: http://codereview.chromium.org/7184031 Review URL: http://codereview.chromium.org/7206060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89947 0039d316-1c4b-4281-b951-d872f2087c98
* views: Pull out DragController class into its own header file.tfarina@chromium.org2011-06-216-40/+57
| | | | | | | | | | | BUG=72040 TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7202015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89921 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 89910 - views: Refactor AddRemoveNotifications unittest.rvargas@google.com2011-06-211-271/+102
| | | | | | | | | | | | | | | | | | | - Extract the code from TestView class. - Move the code into a new class called ObserverView. - Rename the test case from AddRemoveNotifications to ViewHierarchyChanged. - Use ObserverView class instead of TestView. - Improve the checks, make them more clearer. - Use EXPECT_TRUE instead of EXPECT_EQ(true, something); same thing for the false case. BUG=None TEST=views_unittests --gtest_filter=ViewTest.ViewHierarchyChanged Review URL: http://codereview.chromium.org/7184031 TBR=tfarina@chromium.org Review URL: http://codereview.chromium.org/7218025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89913 0039d316-1c4b-4281-b951-d872f2087c98
* views: Refactor AddRemoveNotifications unittest.tfarina@chromium.org2011-06-211-102/+271
| | | | | | | | | | | | | | | | - Extract the code from TestView class. - Move the code into a new class called ObserverView. - Rename the test case from AddRemoveNotifications to ViewHierarchyChanged. - Use ObserverView class instead of TestView. - Improve the checks, make them more clearer. - Use EXPECT_TRUE instead of EXPECT_EQ(true, something); same thing for the false case. BUG=None TEST=views_unittests --gtest_filter=ViewTest.ViewHierarchyChanged Review URL: http://codereview.chromium.org/7184031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89910 0039d316-1c4b-4281-b951-d872f2087c98
* Adds Layer as a class between View and the Texture.sky@chromium.org2011-06-2110-151/+536
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7189067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89880 0039d316-1c4b-4281-b951-d872f2087c98
* [Views] Make ImageView::SetImage() take a const SkBitmap* rather than a ↵rsesek@chromium.org2011-06-212-4/+4
| | | | | | | | | | | non-const one. BUG=none TEST=none Review URL: http://codereview.chromium.org/7214001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89857 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang build.ben@chromium.org2011-06-212-1/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89838 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build.ben@chromium.org2011-06-212-2/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89834 0039d316-1c4b-4281-b951-d872f2087c98
* Change NativeWidgetViews' constructor to not take a parent View. The ↵ben@chromium.org2011-06-2112-39/+50
| | | | | | | | | | | | embedding environment provides this instead via a new ViewsDelegate method: GetDefaultParentView(). This makes the constructors of NativeWidgetViews compatible with the other platforms and allows all of the existing construction patterns to be preserved (there is not a clear way to wire a desktop view through to all of them). BUG=none TEST=none Review URL: http://codereview.chromium.org/7204041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89832 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build error with latest ibus.yusukes@google.com2011-06-211-6/+2
| | | | | | | | | | BUG=build error with latest ibus TEST=Linux desktop Review URL: http://codereview.chromium.org/7206024 Patch from Peng Huang <penghuang@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89801 0039d316-1c4b-4281-b951-d872f2087c98
* views/examples: Move the implementation of TableExample to source file.tfarina@chromium.org2011-06-203-136/+182
| | | | | | | | | | | BUG=None TEST=views_examples R=oshima@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7212003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89663 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land:ben@chromium.org2011-06-171-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure custom frame windows paint as active when they're activated. Rationale for fix: The code in NativeWidgetWin::OnNCActivate schedules a paint for the entire non-client view if the window is visible because its activation state has changed and it'll doubtless require a repaint. A subsequent hack introduced by me to recover from the "other windows bleed through the UI" immediately forces a redraw, before the default WM_NCACTIVATE handler is called for the window. It seems that the window's active state is only set by or after the default WM_NCACTIVATE handler, so this hack redraw causes the window to just repaint itself as inactive since the state hasn't updated yet (and my earlier refactorings have made the frame ask Windows if the window is active rather than relying on custom cached state). So, to address this I moved the hack redraw from NativeWidgetWin::OnNCActivate to NativeWidgetWin::OnActivate, after the state and redraws should have happened. This corrects the issue for me. Update for re-land: Changed the way the widget determines if it is active. For some reason this change was triggering test failures because the test for window status against WS_ACTIVECAPTION used by the internal function IsWindowActive was failing in the test environment. This code is better replaced by a test against the Windows GetActiveWindow() function. http://crbug.com/85791 TEST=see bug Review URL: http://codereview.chromium.org/7165003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89513 0039d316-1c4b-4281-b951-d872f2087c98
* Take transforms into consideration when deciding the dirty region for child ↵sadrul@chromium.org2011-06-171-2/+7
| | | | | | | | | | | views. BUG=none TEST=the close button of the rotated window highlights on hover. Review URL: http://codereview.chromium.org/7193025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89501 0039d316-1c4b-4281-b951-d872f2087c98
* Changing uses of NativeButton to use NativeTextButton, which does not use arogerta@chromium.org2011-06-173-5/+113
| | | | | | | | | | | | | | | | | | native control as implementation, but uses the NativeTheme class instead for rendering. The look and behavior of the buttons should be the same as before BUG=None TEST=Testing of various UIs that use these buttons: - bubble and in-page dialog for cookie management - first-run bubbles and dialogs with buttons - task manager - bookmark bubble and editing view - speech input bubble - download shelf items with "dangerous" content Review URL: http://codereview.chromium.org/7112003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89487 0039d316-1c4b-4281-b951-d872f2087c98
* Make NativeWidgetViews::SchedulePaintInRect usesky@chromium.org2011-06-173-1/+8
| | | | | | | | | | | | | SchedulePaintInRectInternal. We need to do this so that the rootview doesn't think its texture needs to be updated. BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7192021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89482 0039d316-1c4b-4281-b951-d872f2087c98
* views: Change the check in View::AddChildViewAt() to CHECK_NE.tfarina@chromium.org2011-06-161-1/+1
| | | | | | | | | | | BUG=None TEST=views_unittests R=sky@chromium.org Review URL: http://codereview.chromium.org/7191028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89422 0039d316-1c4b-4281-b951-d872f2087c98
* Fix even more crashes. To help identify remaining crashes now and in the ↵ben@chromium.org2011-06-169-26/+51
| | | | | | | | | | future, I have made the GetWidget methods on WidgetDelegate pure virtual. This will cause classes that don't define them to fail compile instead of crashing at run time. http://crbug.com/86119 TEST=none Review URL: http://codereview.chromium.org/7189019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89409 0039d316-1c4b-4281-b951-d872f2087c98
* Add pressure information to touch event.miletus@chromium.org2011-06-166-25/+101
| | | | | | | | | | | | | | | | | | 1. Add touch pressure information to the views::TouchEvent. The pressure is normalized to be in [0, 1] to conform with W3C Touch Event standard (draft)'s definition on pressure. 2. Augment TouchFactory with the ability to save/query the range of TouchParam. In this patch, the max value of pressure is used to normalize the absolute pressure value extracted from the touch device. BUG=None TEST=None Review URL: http://codereview.chromium.org/7149002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89408 0039d316-1c4b-4281-b951-d872f2087c98
* Mark the parent texture dirty when a child view starts using its own texture.sadrul@chromium.org2011-06-161-0/+5
| | | | | | | | | BUG=86343 TEST=none Review URL: http://codereview.chromium.org/7184024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89403 0039d316-1c4b-4281-b951-d872f2087c98
* SetMsgHandled in NativeWidgetWin::OnAppCommand based on WidgetDelegate handling.msw@chromium.org2011-06-161-3/+2
| | | | | | | | | BUG=86252 TEST=Special WM_APPCOMMAND keys function with Chrome focused. Review URL: http://codereview.chromium.org/7190013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89402 0039d316-1c4b-4281-b951-d872f2087c98
* Add View::ReorderChildView and Widget::MoveToTop.sadrul@chromium.org2011-06-1613-1/+109
| | | | | | | | | | | | | | | | | | | | | The z-ordering of child views is currently maintained (implicitly?) by the order they are added to the parent view. It may often be necessary to change the z-order of views, and View::ReorderChildView can be used to do that. I changed views_desktop to have the two pure-views windows to have overlapping regions, and View::ReorderChildView is used to change the z-ordering of the two windows. So it is possible to click a window to activate it and bring it on top of the other. It could have been done without adding Widget::MoveToTop, but given Widget::MoveAbove and MoveAboveWidget, it sounded like a good idea to have Widget::MoveToTop (MoveToFront?). I do now know what the implementation for windows should be, though. So left it as NOTIMPLEMENTED. BUG=none TEST=none Review URL: http://codereview.chromium.org/7185005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89363 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land:ben@chromium.org2011-06-1626-354/+468
| | | | | | | | | | | | | | Move private NativeWidget methods to new internal interface NativeWidgetPrivate. This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 Review URL: http://codereview.chromium.org/7189012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89357 0039d316-1c4b-4281-b951-d872f2087c98
* Create the InputMethod when it is first requested by a child view.penghuang@chromium.org2011-06-161-16/+15
| | | | | | | | | | | | | | | Many widgets(popup menu) do not contain any views which need input method and creating an input method instance may be high cost operation. In those cases we do not create input method util it is fist requested by a child view. BUG=None TEST=Manually Review URL: http://codereview.chromium.org/7170018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89336 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 89216 - Move private NativeWidget methods to new internal interface ↵ben@chromium.org2011-06-1526-468/+354
| | | | | | | | | | | | | | | NativeWidgetPrivate. This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7097016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89232 0039d316-1c4b-4281-b951-d872f2087c98
* Move private NativeWidget methods to new internal interface NativeWidgetPrivate.ben@chromium.org2011-06-1526-354/+468
| | | | | | | | | | This should make it harder to abuse accidentally. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7170019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89216 0039d316-1c4b-4281-b951-d872f2087c98
* added right click check.shinyak@google.com2011-06-151-2/+2
| | | | | | | | | BUG=27882 TEST=Observe that right click works on the context menu on Windows. Review URL: http://codereview.chromium.org/6995152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89170 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the native separator to a regular view. Also, lighten it a bit in color.finnur@chromium.org2011-06-152-91/+14
| | | | | | | | BUG=59288 TEST=Open the page info bubble. The horizontal separator between sections should work as before. Review URL: http://codereview.chromium.org/7144018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89159 0039d316-1c4b-4281-b951-d872f2087c98