summaryrefslogtreecommitdiffstats
path: root/views
Commit message (Collapse)AuthorAgeFilesLines
* views: Rename child_widget() to GetChildWidget().tfarina@chromium.org2011-05-215-10/+10
| | | | | | | | | | | | | | | This is a virtual method, so it shouldn't use the unix_hacker style. Note: This was a TODO for ben. BUG=None TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7056027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86189 0039d316-1c4b-4281-b951-d872f2087c98
* Two tweaks for accelerated painting:sky@chromium.org2011-05-201-5/+29
| | | | | | | | | | | | | | | | | | | . Make sure if there is no texture and we're told to paint, we paint to the whole texture (see comment for details on why we need to do this). . When the transform changes only schedule paint on the widget. By doing this we won't trigger updating the texture, only having the compositor redraw everything. This currently doesn't matter, but will once James lands his changes to SchedulePaint to keep a dirty bit. BUG=none TEST=none R=ben@chromium.org,wjmaclean@chromium.org Review URL: http://codereview.chromium.org/7056013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86139 0039d316-1c4b-4281-b951-d872f2087c98
* Fix touch build after hiding RootView.sadrul@chromium.org2011-05-206-22/+10
| | | | | | | | | BUG=none TEST=compiles with touchui Review URL: http://codereview.chromium.org/6961020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86094 0039d316-1c4b-4281-b951-d872f2087c98
* Address TBR review comments from sky.ben@chromium.org2011-05-202-2/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86091 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang.ben@chromium.org2011-05-202-18/+27
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86085 0039d316-1c4b-4281-b951-d872f2087c98
* Move RootView to the internal namespace.ben@chromium.org2011-05-2034-136/+144
| | | | | | | | | | | Most people should not be using the RootView type. The few cases that do should static_cast for now, until I can find a way to expose the functionality they need on Widget. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7040018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86084 0039d316-1c4b-4281-b951-d872f2087c98
* ui/base/models: Convert GetKeyCode() to unit_hacker() style (key_code()).tfarina@chromium.org2011-05-206-9/+9
| | | | | | | | | | | | | Note: This was a TODO for beng. BUG=None TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7050025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86079 0039d316-1c4b-4281-b951-d872f2087c98
* Compositor GL + basic views support.wjmaclean@chromium.org2011-05-191-0/+5
| | | | | | | | | | | | | | | | Still to do: - support for popups - resizing support - only re-drawing dirty textures - cleanup GL initialisation - revised hit testing BUG=none TEST=none Review URL: http://codereview.chromium.org/7016035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86013 0039d316-1c4b-4281-b951-d872f2087c98
* Globally replace <(library) with static_libraryevan@chromium.org2011-05-191-1/+1
| | | | | | | | | | | We provided <(library) as a variable to support a peculiar build configuration on Linux. We no longer support that build configuration, so we can simplify this code to no longer use a variable. Review URL: http://codereview.chromium.org/7051014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86004 0039d316-1c4b-4281-b951-d872f2087c98
* Fix transform concatenation order in GetTransformRelativeTo, improve/add tests.wjmaclean@chromium.org2011-05-192-25/+57
| | | | | | | | | | | | | | | Add basic test of transform ordering. Revised GetTransformRelativeTo to get concatenation correct. Make numbers less coincidental in unit test. BUG=none TEST=views/view_unittest.cc Review URL: http://codereview.chromium.org/7044025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85985 0039d316-1c4b-4281-b951-d872f2087c98
* Fix EventTypeFromNative to return ET_MOUSE_MOVED for WM_NCMOUSEMOVE message.jianli@chromium.org2011-05-191-1/+2
| | | | | | | | | | | Unlike WM_MOUSEMOVE, The wParam of WM_NCMOUSEMOVE message contains the hit test value and we should not use it to check if the mouse button is down. BUG=none TEST=none Review URL: http://codereview.chromium.org/7051010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85984 0039d316-1c4b-4281-b951-d872f2087c98
* Make use of the new cross-platform POSIX defines toolkit_uses_gtk, os_posix, ↵tony@chromium.org2011-05-191-5/+5
| | | | | | | | | | and use_x11 for the gyp files. For lists of source files that use a mix of POSIX and Gtk APIs, toolkit_uses_gtk was given precedence. I also added Solaris to the remaining grit files. Patch by ruben (chromium@hybridsource.org). Review URL: http://codereview.chromium.org/7011032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85979 0039d316-1c4b-4281-b951-d872f2087c98
* Added logging include.wyck@chromium.org2011-05-191-0/+1
| | | | | | | | | | | | Because interactive_ui_tests weren't compiling with touchui. BUG=none TEST=none Review URL: http://codereview.chromium.org/7050014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85970 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WindowWin|Gtk->NativeWindowWin|Gtkben@chromium.org2011-05-1915-213/+222
| | | | | | | | | BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7048006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85969 0039d316-1c4b-4281-b951-d872f2087c98
* Adds two methods to the MenuDelegate I'm going to need for bookmarksky@chromium.org2011-05-193-6/+15
| | | | | | | | | | | | | menus. Tweaks some wrapping in bookmark_utils.cc and adds an assertion to bookmark_bar_view_test. BUG=81263 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/7029046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85960 0039d316-1c4b-4281-b951-d872f2087c98
* Make NativeButton on touchui focusable. This allows accessibility events to ↵sadrul@chromium.org2011-05-191-0/+1
| | | | | | | | | | | be triggered on focus. BUG=none TEST=AccessibilityEventRouterViewsTest.TestFocusNotification Review URL: http://codereview.chromium.org/7029026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85915 0039d316-1c4b-4281-b951-d872f2087c98
* Fix touch compile after WidgetGtk/NativeWidgetGtk rename.sadrul@chromium.org2011-05-191-0/+1
| | | | | | | | BUG=none TEST=touch buildbot goes green TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85914 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage... these files were ommited from the CL.ben@chromium.org2011-05-192-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85911 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WidgetWin/Gtk -> NativeWidgetWin/Gtk.ben@chromium.org2011-05-1948-554/+585
| | | | | | | | | BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7039050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85910 0039d316-1c4b-4281-b951-d872f2087c98
* Alert boxes shouldn't have a taskbar presence.ben@chromium.org2011-05-181-0/+3
| | | | | | | | | | | | Basically we were ignoring parent/owner window specification in CreateChromeWindow. I need to make InitParams have more of an API, but not in this CL. BUG=80947 TEST=see bug Review URL: http://codereview.chromium.org/7044011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85799 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up a few things now that specialized window types are subclasses of ↵ben@chromium.org2011-05-183-31/+14
| | | | | | | | | | Window/Widget. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7045010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85797 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some rendering glitches in the custom frame by re-introducing nasty old ↵ben@chromium.org2011-05-184-28/+125
| | | | | | | | | | code since I have found no way to avoid using it. BUG=79640 TEST=see bug Review URL: http://codereview.chromium.org/7038021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85774 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for checkboxes in menus that contain icons.atwilson@chromium.org2011-05-181-0/+43
| | | | | | | | | | | Updated NativeMenuWin::OnDrawItem() to properly render checkbox items. BUG=82996 TEST=Install background app on windows, right click on status tray icon, see checkbox and icon in menu. Review URL: http://codereview.chromium.org/7041001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85771 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land:ben@chromium.org2011-05-187-64/+52
| | | | | | | | | | | | Consolidate ShouldUseNativeFrame/AlwaysUseNativeFrame/UseNativeFrame spaghetti. See earlier commit in log for full description. THIS WILL BREAK chrome_frame_tests! BUG=none TEST=none Review URL: http://codereview.chromium.org/7036011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85765 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash when list of devices is NULL (e.g. over VNC/NX sessions).sadrul@chromium.org2011-05-181-1/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7044003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85763 0039d316-1c4b-4281-b951-d872f2087c98
* Move SystemMonitor to base/.willchan@chromium.org2011-05-181-2/+2
| | | | | | | | | | | | | | | I plan to use SystemMonitor in net/. Fix up the Mac implementation not to use Cocoa APIs since @interface is not allowed in base. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85732 Review URL: http://codereview.chromium.org/7015017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85737 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 85732 (broke build) - Move SystemMonitor to base/.willchan@chromium.org2011-05-181-2/+2
| | | | | | | | | | | | | | | | I plan to use SystemMonitor in net/. Fix up the Mac implementation not to use Cocoa APIs since @interface is not allowed in base. BUG=none TEST=none Review URL: http://codereview.chromium.org/7015017 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/7042003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85734 0039d316-1c4b-4281-b951-d872f2087c98
* Move SystemMonitor to base/.willchan@chromium.org2011-05-181-2/+2
| | | | | | | | | | | | | I plan to use SystemMonitor in net/. Fix up the Mac implementation not to use Cocoa APIs since @interface is not allowed in base. BUG=none TEST=none Review URL: http://codereview.chromium.org/7015017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85732 0039d316-1c4b-4281-b951-d872f2087c98
* Do not handle Enable and Disable signals of IBusInputContext.penghuang@chromium.org2011-05-182-27/+1
| | | | | | | | | | | | | | | Becasue Enable and Disable are for indicating if an IBusInputContext is associated with an input method engine and the engine is active. So InputMethodIBus should not use them to decide if the input method system is enabled or not. BUG=None TEST=Manually Review URL: http://codereview.chromium.org/6975013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85718 0039d316-1c4b-4281-b951-d872f2087c98
* Synchronize window resize in MoveMouseToCenterAndPress on linux.oshima@google.com2011-05-181-0/+2
| | | | | | | | | | | | I tried to synchronize it in Show methods (in test mode), but it didn't work because next task is posted before show and running message loop executes the task before the window gets resized. For now, I decided to put the code in ui_controls. Let me know if you have suggestion where to put this code. BUG=82219 TEST=bookmark test and menu_item_view tests are no longer flaky without gtk hack. Review URL: http://codereview.chromium.org/6982031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85711 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 85666 - Consolidate ↵ben@chromium.org2011-05-187-54/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ShouldUseNativeFrame/AlwaysUseNativeFrame/UseNativeFrame spaghetti. Now there is: ... window::ShouldUseNativeFrame() Which is basically just a pass-thru to WindowWin::ShouldUseNativeFrame() ... which can be overridden by subclasses. Native-Frame is a windows-only concept but keeping the API on Window means I don't have to update a lot of call sites. Window also gains a FrameType state member that toggles three states - default, force-native and force-custom. This supercedes the "AlwaysUseNativeFrame/AlwaysUseCustomFrame" methods on NonClientView. I have also hooked up a context menu item behind a command line flag --debug-enable-frame-toggle that allows the frame type for an individual window to be toggled, useful for debugging. BUG=none TEST=none Review URL: http://codereview.chromium.org/7036014 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/6975037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85702 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 85668 - These two un-reviewed lines made it into my last commit and ↵ben@chromium.org2011-05-181-1/+2
| | | | | | | | | weren't part of the change. Removing. TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7039028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85701 0039d316-1c4b-4281-b951-d872f2087c98
* These two un-reviewed lines made it into my last commit and weren't part of ↵ben@chromium.org2011-05-171-2/+1
| | | | | | the change. Removing. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85668 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate ShouldUseNativeFrame/AlwaysUseNativeFrame/UseNativeFrame spaghetti.ben@chromium.org2011-05-177-65/+54
| | | | | | | | | | | | | | | | | | | | | | | Now there is: ... window::ShouldUseNativeFrame() Which is basically just a pass-thru to WindowWin::ShouldUseNativeFrame() ... which can be overridden by subclasses. Native-Frame is a windows-only concept but keeping the API on Window means I don't have to update a lot of call sites. Window also gains a FrameType state member that toggles three states - default, force-native and force-custom. This supercedes the "AlwaysUseNativeFrame/AlwaysUseCustomFrame" methods on NonClientView. I have also hooked up a context menu item behind a command line flag --debug-enable-frame-toggle that allows the frame type for an individual window to be toggled, useful for debugging. BUG=none TEST=none Review URL: http://codereview.chromium.org/7036014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85666 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes 82927 by rolling back part of a change I made this morning. We can't ↵ben@chromium.org2011-05-171-0/+6
| | | | | | | | | | | hide the window during WM_NCLBUTTONDOWN after all. BUG=82927 TEST=none TBR=sky Review URL: http://codereview.chromium.org/7017021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85658 0039d316-1c4b-4281-b951-d872f2087c98
* Makes Transform concrete. Fixes bug in coordinate conversion and makes all ↵sky@chromium.org2011-05-174-150/+142
| | | | | | | | | | | | conversion routines calculate the transform in the same way. Lastly fixes bug in touch_factory.cc that was causing crashes on my machine when running views_unittests. Oh, and adds some tests of conversion methods. BUG=none TEST=none R=ben@chromium.org,sadrul@chromium.org Review URL: http://codereview.chromium.org/7033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85635 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes more default non-client frame painting.ben@chromium.org2011-05-174-4/+20
| | | | | | | | http://crbug.com/22704 TEST=see bug Review URL: http://codereview.chromium.org/7030025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85628 0039d316-1c4b-4281-b951-d872f2087c98
* views: Convert while loop to for loop on View::Contains().tfarina@chromium.org2011-05-172-4/+24
| | | | | | | | | | | BUG=None TEST=out/Debug/views_unittests --gtest_filter=ViewTest.Contains R=sky@chromium.org Review URL: http://codereview.chromium.org/6973069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85572 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 85528 - We were returning the wrong value of ShouldUseNativeFrame for ↵ben@chromium.org2011-05-162-3/+2
| | | | | | | | | | | | | | | popup windows when a theme is installed and the rest of the desktop is in glass mode. We were returning false instead of true, even though themes are applied only to tabbed browser windows. This means that even though the window was rendered using the glass frame (due to a correct check somewhere else) the widget calculated the client size incorrectly. http://crbug.com/80774 TEST=none Review URL: http://codereview.chromium.org/7015057 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7034019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85536 0039d316-1c4b-4281-b951-d872f2087c98
* We were returning the wrong value of ShouldUseNativeFrame for popup windows ↵ben@chromium.org2011-05-162-2/+3
| | | | | | | | | | | | when a theme is installed and the rest of the desktop is in glass mode. We were returning false instead of true, even though themes are applied only to tabbed browser windows. This means that even though the window was rendered using the glass frame (due to a correct check somewhere else) the widget calculated the client size incorrectly. http://crbug.com/80774 TEST=none Review URL: http://codereview.chromium.org/7015057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85528 0039d316-1c4b-4281-b951-d872f2087c98
* base/i18n: Put break_iterator* into namespace i18n.tfarina@chromium.org2011-05-162-3/+4
| | | | | | | | | | | BUG=None TEST=None R=brettw@chromium.org Review URL: http://codereview.chromium.org/7034012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85525 0039d316-1c4b-4281-b951-d872f2087c98
* Fix typo in GetTouchEventTypepenghuang@chromium.org2011-05-161-1/+1
| | | | | | | | | | BUG=touchui crashes in debug build TEST=manually Review URL: http://codereview.chromium.org/7034011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85520 0039d316-1c4b-4281-b951-d872f2087c98
* InputMethodIBus::IsActive should return true, if context_ is not NULL.penghuang@chromium.org2011-05-161-1/+1
| | | | | | | | | | | | | RHWVV will disable inpput method support in webkit by host_->SetInputMethodActive(false), if InputMethodIBus::IsActive() returns false. And then webkit will not notify chrome any change of input (RHWVV::ImeUpdateTextInputState() will not be called), and text_input_type_ will not be changed and the keyboard events will not be sent to ibus too. So ibus will not be enabled by keyboard events for ever. BUG=sometime input method does not work in web page TEST=manually Review URL: http://codereview.chromium.org/7013057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85499 0039d316-1c4b-4281-b951-d872f2087c98
* [Views/GTK] also suppress the OnClicked signal when invoked ↵jochen@chromium.org2011-05-162-17/+23
| | | | | | | | | | | | gtk_radio_button_set_group BUG=59872 TEST=as described in the bug Review URL: http://codereview.chromium.org/7011035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85483 0039d316-1c4b-4281-b951-d872f2087c98
* Added explicit RemoveObserver in dtor of WidgetGtk.altimofeev@chromium.org2011-05-161-0/+3
| | | | | | | | | BUG=chromium-os:14885 TEST=Sign in as a new user, sign out works fine. Review URL: http://codereview.chromium.org/6932034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85478 0039d316-1c4b-4281-b951-d872f2087c98
* Fix touch build for unit tests.sky@chromium.org2011-05-141-1/+1
| | | | | | | | | | | R=ben@chromium.org TBR=ben@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/7015060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85352 0039d316-1c4b-4281-b951-d872f2087c98
* Fix touch build.sky@chromium.org2011-05-131-0/+1
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6969076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85350 0039d316-1c4b-4281-b951-d872f2087c98
* Workaround for menu crash.oshima@google.com2011-05-131-3/+5
| | | | | | | | | | | | | | | I don't fully understand how this can happen because handler should not exist if handler_id is 0. There may be some undocumented behavior in gtk. I couldn't reproduce this on my machine either (but i've seen on tester's machine) so this is hypothetical workaround that should fix this. BUG=chromium-os:15212 TEST=see bug for reprostep Review URL: http://codereview.chromium.org/7013058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85346 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Edit to have one Undo/Redooshima@google.com2011-05-135-289/+283
| | | | | | | | | | | Always use Redo() to modify the text. BUG=none TEST=new tests added Review URL: http://codereview.chromium.org/7011025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85344 0039d316-1c4b-4281-b951-d872f2087c98
* This CL increases the menu items size and the spacing between the status icons.saintlou@chromium.org2011-05-131-1/+10
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7013042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85331 0039d316-1c4b-4281-b951-d872f2087c98