summaryrefslogtreecommitdiffstats
path: root/views/widget
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the PlatformContext layer to have only one class.brettw@chromium.org2009-06-142-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Previously we had three classes of PlatformCanvas*, one for each platform. Then we had a typedef of PlatformContext to PlatformCanvas[Mac|Win|Linux] for the specific platform. This means that it was almost impossible to forward-declare PlatformCanvas and there were a bunch of unnecessary includes of platform_canvas.h in header files. This change makes there be only one platform_canvas.h header with ifdefs, which removes a decent amount of duplicated code. There is a platform-independent file, and one platform-dependent file of platform_canvas for each platform. I also renamed PlatformDevice[Mac|Win|Linux] to PlatformDevice, althouth in this case I kept the separate headers since there was much less overlap. I also broke out CanvasPaint into separate headers so this template doesn't need to be included all over the project (only a couple of files actually need it). Review URL: http://codereview.chromium.org/125109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18363 0039d316-1c4b-4281-b951-d872f2087c98
* Fix reversed focus traversal order issue.yutak@chromium.org2009-06-124-50/+89
| | | | | | | | | | | | | | | | This change fixes several problems in handling focus traversal and resolves TabbedPane's traversal order issue. Reversed focus traversal is very tricky, and the original traversal code overlooked several things. (1) A focusable view may have a FocusTraverasble. (2) When we are going down, we have to check if the current view has a FocusTraversable. (3) When we are going up from a FocusTraversable, the parent view may gain the next focus. This change fixes these issues. BUG=6871 TEST=See issue 6871. Review URL: http://codereview.chromium.org/125062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18335 0039d316-1c4b-4281-b951-d872f2087c98
* Changing the focus manager to not subclass HWNDs (but for the ↵jcampan@chromium.org2009-06-121-4/+0
| | | | | | | | top-windows).Components that have HWND now need to specifically let the FocusManager know when they get the native focus.This is the reason for the new GotFocus() notification on the RenderWidgetHostViewWin class.BUG=NoneTEST=Run the interactive tests, the unit-tests. Test that the focus is remembered correctly when switching windows, switching tabs. Test that focus traversal in the browser and in the option dialog works as expected. Review URL: http://codereview.chromium.org/122002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18301 0039d316-1c4b-4281-b951-d872f2087c98
* Issue 8838: Close box not highlightedidanan@chromium.org2009-06-101-0/+8
| | | | | | | | | | | | | | | We optimize mouse-mouve event handling by ignoring two mouse-move events in a row which works in most cases except that when we animate tab-closing on windows we send a duplicate mouse-move event on purpose to highlight the button. Unfortunately our optimization kicks in. Fixed by reseting the flag to optimize this before sending the extra mouse-move. BUG=8838 Review URL: http://codereview.chromium.org/118454 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18052 0039d316-1c4b-4281-b951-d872f2087c98
* Moving the Windows specific activation code in the FocusManager to the ↵jcampan@chromium.org2009-06-082-0/+24
| | | | | | | | | | widget_win. BUG=None TEST=Test that the focus in the browser works well: that windows remember which view had focus when deactivated/reactivated. Make sure focus traversal works as expected. Review URL: http://codereview.chromium.org/118406 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17911 0039d316-1c4b-4281-b951-d872f2087c98
* First part of tab overview. It isn't wired up, nor is it complete, butsky@chromium.org2009-06-085-0/+22
| | | | | | | | | | | it's a good enough stage that I want to check it in. BUG=none TEST=none Review URL: http://codereview.chromium.org/119329 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17906 0039d316-1c4b-4281-b951-d872f2087c98
* Removing some unused FocusManager related code from RootView.jcampan@chromium.org2009-06-082-25/+0
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/119312 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17899 0039d316-1c4b-4281-b951-d872f2087c98
* Makes it possible for Widget's on GTK to have a transparentsky@chromium.org2009-06-083-3/+110
| | | | | | | | | | | | background. Additionally implements always on top and makes ImageView support borders. BUG=none TEST=none Review URL: http://codereview.chromium.org/119269 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17878 0039d316-1c4b-4281-b951-d872f2087c98
* More theme bits for the NTP and window frame.glen@chromium.org2009-06-052-0/+5
| | | | | | | | | BUG=12768,13352 TEST=Verify that a theme with attribution works on the NTP and a theme with an overlay shows up Review URL: http://codereview.chromium.org/119227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17773 0039d316-1c4b-4281-b951-d872f2087c98
* Implement some basic functionality in RootView and View.ben@chromium.org2009-06-053-21/+11
| | | | | | Review URL: http://codereview.chromium.org/119231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17714 0039d316-1c4b-4281-b951-d872f2087c98
* Implement window state restoration for the views-gtk window.ben@chromium.org2009-06-042-1/+1
| | | | | | | | | | | Allows the window to be resized smaller than its current size by setting a minimum size before initiating the drag. Fixes a crash in TabContentsViewGtk due to a NULL delegate deref. BUG=none TEST=none Review URL: http://codereview.chromium.org/118227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17641 0039d316-1c4b-4281-b951-d872f2087c98
* Rephrase this code to be slightly less verbose.ben@chromium.org2009-06-041-5/+2
| | | | | | | | | TBR=glen BUG=none TEST=none Review URL: http://codereview.chromium.org/119157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17615 0039d316-1c4b-4281-b951-d872f2087c98
* Replace HCURSOR usage in views::View with a new gfx::NativeCursor type that ↵ben@chromium.org2009-06-042-22/+25
| | | | | | | | | | | | | also supports GdkCursor*, and wires this up with the existing implementors of the GetCursorForPoint method. This allows us to get rid of one of the most annoying NOTIMPLEMENTED()s in views-gtk. BUG=none TEST=none Review URL: http://codereview.chromium.org/119150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17614 0039d316-1c4b-4281-b951-d872f2087c98
* Implement custom window shapes as provided by the NonClientView in WindowGtk.ben@chromium.org2009-06-041-0/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17597 0039d316-1c4b-4281-b951-d872f2087c98
* Adds linux2 variable and change to WidgetGtk to make it compile.sky@chromium.org2009-06-021-0/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17442 0039d316-1c4b-4281-b951-d872f2087c98
* Allow themes to change the background of the new tab page. Adds support for ↵glen@chromium.org2009-06-022-1/+4
| | | | | | | | | | | display properties to themes (stored internally as ints/enums, but parsed from text). BUG=12768 TEST=Install a theme with an new tab page background and verify that the background appears on the new tab page. Review URL: http://codereview.chromium.org/115910 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17431 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a couple of bugs encountered in getting info bubbles to work:sky@chromium.org2009-06-021-1/+4
| | | | | | | | | | | | | | | | . Initial bounds of windows weren't being set. . Widgets were created initially shown. This was bad for windows as the window would end up showing prematurely. . WindowGtk::window_state_ wasn't being initialized. . And then actual InfoBubble stuff: properly init the bubble, show it and position it on the monitor. BUG=none TEST=none Review URL: http://codereview.chromium.org/118102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17401 0039d316-1c4b-4281-b951-d872f2087c98
* Moves WindowGtk::SetBounds implementation to WidgetGtk as WidgetGetksky@chromium.org2009-06-011-1/+6
| | | | | | | | | | | needs to deal with windows/popups too. BUG=none TEST=none Review URL: http://codereview.chromium.org/118082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17350 0039d316-1c4b-4281-b951-d872f2087c98
* Use the right frame type on startup, do proper swapping of frames when ↵glen@chromium.org2009-05-313-1/+14
| | | | | | | | | | | themes change. Leave the native frame decision up to the ThemeProvider. BUG=12890 TEST=In Aero, unstall a theme, reset to default, install again, restart, reset theme to default. Make sure that the Aero frame changes to the themed frame and back again appropriately. Review URL: http://codereview.chromium.org/118053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17301 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bad event signal name that was leading to crash.sky@chromium.org2009-05-291-3/+2
| | | | | | | | | | BUG=none TEST=none TBR=ben Review URL: http://codereview.chromium.org/118037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17264 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes couple of bugs that occur now that we can actually run views onsky@chromium.org2009-05-292-2/+14
| | | | | | | | | | | gtk again. BUG=none TEST=none TBR=ben Review URL: http://codereview.chromium.org/115961 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17261 0039d316-1c4b-4281-b951-d872f2087c98
* Really theme the find bar. We were previously getting the ↵glen@chromium.org2009-05-292-6/+12
| | | | | | | | | | | | | | DefaultThemeProvider (whose accessor was mistakenly named 'getDIALOGthemeprovider') BUG=11702 TEST=Install a theme and verify that the find bar matches it. TBR=finnur Review URL: http://codereview.chromium.org/115729 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17257 0039d316-1c4b-4281-b951-d872f2087c98
* Revert Revision 17224glen@chromium.org2009-05-292-11/+5
| | | | | | | | | BUG=none TEST=non Review URL: http://codereview.chromium.org/115951 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17245 0039d316-1c4b-4281-b951-d872f2087c98
* Really theme the find bar. We were previously getting the ↵glen@chromium.org2009-05-292-5/+11
| | | | | | | | | | | DefaultThemeProvider (whose accessor was mistakenly named 'getDIALOGthemeprovider') BUG=11702 TEST=Install a theme and verify that the find bar matches it. Review URL: http://codereview.chromium.org/115729 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17224 0039d316-1c4b-4281-b951-d872f2087c98
* Fix drawing problem with options dialog. I'm not sure why this flag is ↵jam@chromium.org2009-05-291-1/+1
| | | | | | | | | | needed, other than it fixes the paint issue. Perhaps it's generated internally by Windows for the child static HWNDs when RedrawWindow with RDW_ALLCHILDREN is called. BUG=12793 Review URL: http://codereview.chromium.org/115908 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17211 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where SetBounds would change the z-order. This was resultingsky@chromium.org2009-05-291-1/+1
| | | | | | | | | | | | in windows that triggered status bubble (such as gmail) to always come to front. BUG=none TEST=see bug Review URL: http://codereview.chromium.org/113962 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17140 0039d316-1c4b-4281-b951-d872f2087c98
* Splits TooltipManager so that it can be ported and stubs out the GTKsky@chromium.org2009-05-2811-180/+330
| | | | | | | | | | | side. BUG=none TEST=none Review URL: http://codereview.chromium.org/114054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17076 0039d316-1c4b-4281-b951-d872f2087c98
* Makes MenuButton compile and fixes bug in GtkWidget I happened upon.sky@chromium.org2009-05-271-3/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/115826 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17018 0039d316-1c4b-4281-b951-d872f2087c98
* Removes WidgetWin dependency from StatusBubbleViews so that it can compile ↵ben@chromium.org2009-05-265-116/+141
| | | | | | | | | | | | | | | | on Linux. Requires: - making SetOpacity a cross platform method on Widget, replacing SetLayeredAlpha. - moving Window::SetBounds to Widget - replacing usage of MoveWindow in StatusBubbleViews with call to new SetBounds method. BUG=none TEST=make sure transparency still works for floating widgets like - status bubble, full screen exit bubble, dragged tabs Review URL: http://codereview.chromium.org/113846 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16948 0039d316-1c4b-4281-b951-d872f2087c98
* Makes FindBarWin buildable on linux. FindBarWin should be renamed tosky@chromium.org2009-05-232-2/+28
| | | | | | | | | | | FindBarViews, but I'm leaving it as is for now. BUG=none TEST=none Review URL: http://codereview.chromium.org/113793 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16830 0039d316-1c4b-4281-b951-d872f2087c98
* Minor gtk-views cleanup:sky@chromium.org2009-05-202-14/+83
| | | | | | | | | | | | | . Makes closing widget work. . Makes clicking button send action. . Fixes ownership of native controls. BUG=none TEST=none Review URL: http://codereview.chromium.org/113657 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16532 0039d316-1c4b-4281-b951-d872f2087c98
* Remove TRACK_HWND_CREATION/TRACK_HWND_DESTRUCTION macro since the bug it was ↵jam@chromium.org2009-05-201-2/+0
| | | | | | | | created for has long been closed. This code causes crashes when the browser is closed with the task manager open (in debug builds at the very least). Review URL: http://codereview.chromium.org/115553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16462 0039d316-1c4b-4281-b951-d872f2087c98
* Adds propagation and handling of render-side focus events, for the benefit ↵klink@chromium.org2009-05-201-4/+0
| | | | | | | | of assistive technologies (accessibility). Also cleans up the handling of WM_GETOBJECT in RenderWidgetHostViewWin and WidgetWin, as well as in BrowserAccessibilityManager. Review URL: http://codereview.chromium.org/115374 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16449 0039d316-1c4b-4281-b951-d872f2087c98
* Fix painting problems that came up after manually calling RedrawWindow on ↵jam@chromium.org2009-05-201-3/+6
| | | | | | | | | | child windows so that we can paint out of process HWNDs asynchronously. The problem is that the function parameter that was passed in to the first RedrawWindow was modified since it's a member variable of the class. OnPaint would empty the rectangle, and so nothing was painted for children. BUG=12010 TEST=unsafe downloads should have their save/discard buttons painted normally. Review URL: http://codereview.chromium.org/115545 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16446 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes delivery of mouse events in WidgetGtk. Also fixes GetRootWidgetsky@chromium.org2009-05-192-52/+155
| | | | | | | | | | | and GetWidget to match windows. BUG=none TEST=none Review URL: http://codereview.chromium.org/113603 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16431 0039d316-1c4b-4281-b951-d872f2087c98
* Removes some dead code from WidgetWin.sky@chromium.org2009-05-192-8/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/115528 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16407 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeCanvas->gfx::Canvasben@chromium.org2009-05-156-14/+13
| | | | | | | | | | | Rename files too. TBR=brettw http://crbug.com/11387 Review URL: http://codereview.chromium.org/113443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16148 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeFont->gfx::Fontbeng@google.com2009-05-152-10/+12
| | | | | | | | | | Does not rename the files yet. http://crbug.com/11387 Review URL: http://codereview.chromium.org/113441 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16141 0039d316-1c4b-4281-b951-d872f2087c98
* Remove even more ATL dependencies.maruel@chromium.org2009-05-143-7/+6
| | | | | | Review URL: http://codereview.chromium.org/115309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16088 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 15832 since this test is finished.hbono@chromium.org2009-05-141-1/+1
| | | | | | | BUG=11046 "Need to back out hbono's test fix" Review URL: http://codereview.chromium.org/112021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16047 0039d316-1c4b-4281-b951-d872f2087c98
* Make WidgetWin redraw child windows that are in a different process ↵jam@chromium.org2009-05-141-3/+30
| | | | | | | | | | | asynchronously. This helps with jank (i.e. bug 11701 which I couldn't repro with this) and also with deadlocks (fixes 11421 for painting). BUG=11421,11701 Review URL: http://codereview.chromium.org/115216 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16027 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 15965. I wasn't supposed to check that in since it still doesn't ↵maruel@chromium.org2009-05-133-6/+7
| | | | | | | | | compile on linux and mac! TBR=sky Review URL: http://codereview.chromium.org/113351 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15967 0039d316-1c4b-4281-b951-d872f2087c98
* Remove even more ATL dependencies.maruel@chromium.org2009-05-133-7/+6
| | | | | | Review URL: http://codereview.chromium.org/115309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15965 0039d316-1c4b-4281-b951-d872f2087c98
* This CL updates chrome to the latest version of skia, retrieved via DEPS, andsenorblanco@chromium.org2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | placed in third_party. All relevant skia changes (for all 3 platforms) have been upstreamed. Most of this CL is mind-numbingly repetitive. Things of interest are: skia.gyp (now points at third_party versions), DEPS, and SkUserConfig.h. stdint.h: Skia now requires C99 integer types, which MSVC doesn't support natively. I have put typedefs in config/win/stdint.h. Note that the new version of skia appears to render rects whose coordinates are "backwards" (ie., x2 < x1 or y2 < y1), which were formerly culled. There were a couple obvious instances of this in the code which I fixed, but there may be more. There were ~35 layout test failures due to minor pixel differences which I rebaselined on Windows and Linux, and 8 genuine failures related to masks and stroked text, which I have put in text_expectations.txt and assigned to myself. (There was another change which broke ~1700 tests on each platform, but I put that change behind an #ifdef for now). R=brettw Review URL: http://codereview.chromium.org/65012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15949 0039d316-1c4b-4281-b951-d872f2087c98
* An experimental fix for Issue 11046.hbono@chromium.org2009-05-121-1/+1
| | | | | | | | | This change replaces some ImmAssociateContextEx() calls with a LoadLibrary() call and a GetProcAddress() call to prevent Chrome from loading "imm32.dll" on a PC which doesn't have valid "imm32.dll" installed. (Since I have not been able to reproduce this issue on my XP box, this is just a blind fix.) BUG=11046 "repeated crash on launch" Review URL: http://codereview.chromium.org/113096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15832 0039d316-1c4b-4281-b951-d872f2087c98
* Removing floating views, they are not used anymore.jcampan@chromium.org2009-05-111-90/+14
| | | | | | | | | BUG=None TEST=Run unit_tests, ui_tests, interactive ui_tests. Make sure focus traversal still works. Review URL: http://codereview.chromium.org/113215 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15817 0039d316-1c4b-4281-b951-d872f2087c98
* Adds back some code removed during Ben's landing of views renaming.sky@chromium.org2009-05-111-3/+1
| | | | | | | | | | | Adds support for GTK buttons. BUG=none TEST=none Review URL: http://codereview.chromium.org/113212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15793 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new ViewsDelegate interface and implementation in the windows browser UI.ben@chromium.org2009-05-101-3/+4
| | | | | | | | | | | | Provides a way for saving and restoring window placement, obtaining system helpers etc. http://crbug.com/11633 TEST=make sure window placement saving works, clipboard, and that windows in the taskbar have a chrome icon. Review URL: http://codereview.chromium.org/113173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15733 0039d316-1c4b-4281-b951-d872f2087c98
* Random cleanups and stubs to get cross platform build going.glen@chromium.org2009-05-092-0/+6
| | | | | | | | TBR=beng Review URL: http://codereview.chromium.org/115158 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15712 0039d316-1c4b-4281-b951-d872f2087c98
* This is the first pass at themes.glen@chromium.org2009-05-095-0/+86
| | | | | | | | | | | | This CL is paired with http://codereview.chromium.org/67284 This CL (for commit purposes) includes http://codereview.chromium.org/67284 BUG=4463,11232,11233,11234,11235 Review URL: http://codereview.chromium.org/99030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15704 0039d316-1c4b-4281-b951-d872f2087c98