summaryrefslogtreecommitdiffstats
path: root/views/widget
Commit message (Collapse)AuthorAgeFilesLines
* Centralizes checking for non-null return from CreateWindow.sky@chromium.org2011-04-192-0/+6
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6880034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82137 0039d316-1c4b-4281-b951-d872f2087c98
* Removes code added to track down crash. The crash seems to havesky@chromium.org2011-04-155-102/+1
| | | | | | | | | | | | | | | | | | | | occurred for two reasons: . window class name changing out from under us. . CreateWindow returning NULL because we're out of memory. I've changed the following: . Left in CHECK on return from CreateWindow. . Removed dependency on class name. We don't really need it anyway. I've also changed View::PaintFocusableBorder to check focusable last, as that requires looking up the FocusManager BUG=77651 TEST=none Review URL: http://codereview.chromium.org/6865023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81812 0039d316-1c4b-4281-b951-d872f2087c98
* Prefer UTF8 strings over ASCII strings when requesting text from azork@chromium.org2011-04-141-9/+9
| | | | | | | | | | | | | drag and drop operation BUG=chromium-os:12275 TEST=Manual Review URL: http://codereview.chromium.org/6825035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81523 0039d316-1c4b-4281-b951-d872f2087c98
* Adds yet more debugging code.sky@chromium.org2011-04-131-1/+16
| | | | | | | | | | BUG=77651 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6834006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81363 0039d316-1c4b-4281-b951-d872f2087c98
* Pull content from TabContentsViewViews into NativeTabContentsViewWin.ben@chromium.org2011-04-127-0/+32
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6824060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81328 0039d316-1c4b-4281-b951-d872f2087c98
* Adds more debugging code in hopes of figuring out a crash. Most commonsky@chromium.org2011-04-111-2/+6
| | | | | | | | | | | | | | | | reason for crash appears to be because we can't find the WindowWin for an hwnd. I'm also removing a comment that is no longer relevant, and nuking a call in window_win to ui::SetWindowUserData that is already done in WindowImpl. BUG=77651 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6825045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81150 0039d316-1c4b-4281-b951-d872f2087c98
* Reenable FREEZE_UPDATE propertyoshima@google.com2011-04-112-4/+62
| | | | | | | | | | | | | | | This is a real fix for 13750. When the entire area of a WidgetGtk is covered by another GdkWindow, the WidgetGtk doesn't get expose event, which was causnig 13750. This fixes this issue by listening child widget's expose event and remove the FREEZE_UPDATE property. BUG=chromium-os:11514, chromium-os:13750 TEST=see bug for repro steps R=sky@chromium.org Review URL: http://codereview.chromium.org/6823017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81123 0039d316-1c4b-4281-b951-d872f2087c98
* Adds more debugging code in hopes of figuring out a crash. Sorry forsky@chromium.org2011-04-084-1/+67
| | | | | | | | | | | | | | | | | needing to add so much plumbing here. We're not creating the FocusManager for BrowserView. I can only think that either we're not getting the create event, or we're getting the wrong parent widget. This should help us nail down which one is happening. BUG=77651 TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6820009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81012 0039d316-1c4b-4281-b951-d872f2087c98
* Combine WidgetWin KeyEvent handlers.msw@chromium.org2011-04-082-17/+6
| | | | | | | | | BUG=72040 TEST=Key Events on Widgets in Windows Review URL: http://codereview.chromium.org/6813033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80900 0039d316-1c4b-4281-b951-d872f2087c98
* Don't store/restore focus when window is activated/deactivated on linux.oshima@google.com2011-04-071-5/+0
| | | | | | | | | | | | GTK can restore focus if the native widget has a focus, and views always remembers the focused_view, so there is no need to store/restore on linux for this case. Opening it (like wrench menu) was causing the issues in bugs because it changes window activation. BUG=70032,chromium-os:8829 TEST=see bugs TEST= Review URL: http://codereview.chromium.org/6691052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80809 0039d316-1c4b-4281-b951-d872f2087c98
* RTL window styles was being set on too many HWNDs. This inverts the default. ↵ben@chromium.org2011-04-061-2/+2
| | | | | | | | | | There may be cases where the window styles are necessary however. Those I do not know and am going to rely on RTL QA to tell me about. http://crbug.com/77166 TEST=start chrome with --lang=he, content area should render and not be inverted, wrench menu should not be inverted. This change may cause some HWNDs to be incorrectly not flipped. Please let me know about those cases. Review URL: http://codereview.chromium.org/6804027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80701 0039d316-1c4b-4281-b951-d872f2087c98
* Fix WidgetWin MouseWheelEvent handling.msw@chromium.org2011-04-062-19/+4
| | | | | | | | | BUG=78569 TEST=Scroll over long bookmark menu. Review URL: http://codereview.chromium.org/6803015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80700 0039d316-1c4b-4281-b951-d872f2087c98
* Added SchedulePaint in BrowserView::OnWindowActivationChangedwyck@chromium.org2011-04-061-1/+3
| | | | | | | | | | BUG=78463 TEST=None Review URL: http://codereview.chromium.org/6691065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80624 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily disaling FREEZE_UPDATE propertyoshima@google.com2011-04-051-0/+4
| | | | | | | | | | | Panel has problem with FREEZE_UPDATE. I'm going to disable this for now as it will take some time to figure out and implement solution. BUG=chromium-os:13750 TEST=none Review URL: http://codereview.chromium.org/6735069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80548 0039d316-1c4b-4281-b951-d872f2087c98
* rename getBitmapDC to beginPlatformPaint and add calls to endPlatformPaintvandebo@chromium.org2011-04-051-1/+2
| | | | | | | | | | | This takes a step toward unifying the platform device interface between Windows and Linux and helps to make VectorPlatformDeviceSkia have less ifdefs. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6677142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80474 0039d316-1c4b-4281-b951-d872f2087c98
* Transform GdkEvents for simpler MouseEvent construction.msw@chromium.org2011-04-054-59/+27
| | | | | | | | | | | Handle MouseWheelEvent in Widget::OnMouseEvent. BUG=72040 TEST=Mouse interaction on linux_views Review URL: http://codereview.chromium.org/6720025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80420 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate constrained window code into a cross platform base class.ben@chromium.org2011-04-041-1/+2
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6735041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80386 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for regressions caused by FREEZE_UPDATE propertyoshima@google.com2011-04-042-0/+8
| | | | | | | | | | | | * menu can be closed before being shown. (native_menu_gtk.cc) * virtual keyboard doesn't get expose event on window_contents_ due to renderer covering the entire area. BUG=chromium-os:13760, chromium-os:11514 TEST=refer to bugs. Review URL: http://codereview.chromium.org/6794026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80366 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor RenderWidgetHostViewViews to use the new input method API for Views.suzhe@google.com2011-04-012-5/+12
| | | | | | | | | | | | | | | This CL also fixes some issues related to NULL host_ pointer in the original code. Hope the fixes are correct. Another side effect of this CL is: it converts views::KeyEvent to NativeWebKeyboardEvent by using the conversion table of Views instead of WebInputEventFactory provided by WebKit. See bug 54315. BUG=54315 BUG=75003 TEST=none Review URL: http://codereview.chromium.org/6713083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80238 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate cross platform logic into MenuHost.ben@chromium.org2011-04-017-80/+90
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6690054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80232 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate the new input method API for Views into Chromium.suzhe@google.com2011-04-017-57/+254
| | | | | | | | | | | | | | | | | | This CL contains following changes: 1. Improve TextfieldViewsModel to support composition text. 2. Implement TextInputClient interface in NativeTextfieldViews. 3. Fix Textfield and native implementations to avoid calling TextfieldController::ContentsChanged() when the text is changed by calling Textfield::SetText() or AppendText(). 4. Fix a bug in FocusManager that causes NativeTextfieldViewsTest.FocusTraversalTest to fail. 5. Fix accelerator_handler_touch.cc to send key events to the top-level widget's input method instance instead of the root view. 6. Do the same fix in extension_input_api.cc. 7. Hook InputMethod into WidgetGtk and WidgetWin. BUG=75003 TEST=views_unittests --gtest_filter=NativeTextfieldViews* Review URL: http://codereview.chromium.org/6675005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80226 0039d316-1c4b-4281-b951-d872f2087c98
* Notify child widgets before and after a reparenting.asanka@chromium.org2011-03-312-0/+37
| | | | | | | | | | | | | | | | Attaching a native view to a NativeViewHostWin may cause that view to be disassociated from a view hierarchy with a different FocusManager. Notifying the widgets that they are about to be removed from their current parent gives them the opportunity to disassociate themselves from their current FocusManager. BUG=77447 TEST=none Review URL: http://codereview.chromium.org/6776025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80096 0039d316-1c4b-4281-b951-d872f2087c98
* New InputMethod api for Views.suzhe@google.com2011-03-313-0/+56
| | | | | | | | | | | | | | This CL adds: 1. Interfaces: InputMethod, InputMethodDelegate, TextInputClient. 2. InputMethodGtk: an InputMethod implementation based on GtkIMContext. 3. MockInputMethod: a mock InputMethod implementation for unit tests. BUG=75003 TEST=none Review URL: http://codereview.chromium.org/6688049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80076 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang failure; out-of-line a virtual.msw@chromium.org2011-03-312-1/+5
| | | | | | | | | BUG=none TEST=linux clang build fix. Review URL: http://codereview.chromium.org/6780040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80073 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate Widget Event code, other cleanup.msw@chromium.org2011-03-3112-405/+189
| | | | | | | | | | | | | Rename *NativeCapture to *MouseCapture. Rename and move ShouldReleaseCaptureOnMouseReleased. Move static flag function to Event. BUG=72040 TEST=Mouse interaction on win & linux_views. Review URL: http://codereview.chromium.org/6756043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80065 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for paint issue on initial screen.oshima@google.com2011-03-312-10/+70
| | | | | | | | | | | | | It turns out that the sync counter that we used to rely on to synchronize window painting doesn't work for the initial screen as gtk may ignore and simply update the count without painting if the configure notify doesn't change the window size. This change uses FREEZE_UPDATES to notify WM to guarantee that WM will show only after the window is painted. I also removed gdk_window_process_updates from login code because this fixes crosbug.com/12566. I confirmed that gdk_widnow_process_update in map handler is necessary for touch. This is due to a bug in touch code but since this path will be removed in near future, i'll keep this workaround as is for touch. BUG=chromium-os:11514 TEST=see bug description. Review URL: http://codereview.chromium.org/6698063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80056 0039d316-1c4b-4281-b951-d872f2087c98
* Make MenuHost concrete, hide platform specific implementation behind ↵ben@chromium.org2011-03-311-0/+10
| | | | | | | | | | | | NativeMenuHost. This is the first step, creating this structure. Will consolidate common functionality and state next. BUG=72040 TEST=all menu tests for bookmark bar, wrench menu Review URL: http://codereview.chromium.org/6740022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80015 0039d316-1c4b-4281-b951-d872f2087c98
* The native tabbed pane was not showing its content window upon creation,rogerta@chromium.org2011-03-311-1/+1
| | | | | | | | | | | | | resulting in the views_examples tools to display blank tabs. Child windows should be made visible by default. BUG=None TEST=make sure the views_examples.exe tool show the correct content for all its tabs R=ben@chromium.org Review URL: http://codereview.chromium.org/6670123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79998 0039d316-1c4b-4281-b951-d872f2087c98
* In preparation for NativeTheme refactoring, renaming the class NativeThemerogerta@chromium.org2011-03-301-2/+2
| | | | | | | | | | | | to NativeThemeWin, since it is windows specific anyway. BUG=None TEST=None R=xiyuan@chromium.org Review URL: http://codereview.chromium.org/6778009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79874 0039d316-1c4b-4281-b951-d872f2087c98
* Disambiguate OnMouseCaptureLost from OnMouseReleased.msw@chromium.org2011-03-294-22/+24
| | | | | | | | | | | | | Nix RenderWidgetHostViewViews' OnMouseCaptureLost forwarding. Consolidate code, remove unnecessary overrides, etc. Fix up test, |event| args, OVERRIDEs, and (c) dates. BUG=72040 TEST=Views mouse button release, cancelling mouse down/drag. Review URL: http://codereview.chromium.org/6685069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79640 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage by initializing variable.ben@chromium.org2011-03-281-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79587 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more WidgetWin/WidgetGtk creations to use a new cross-platform ↵ben@chromium.org2011-03-284-20/+48
| | | | | | | | | | static ctor on Widget: CreateWidget(). BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6732028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79586 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-286-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some WidgetWin construction to use CreateParams.ben@chromium.org2011-03-247-18/+26
| | | | | | | | | BUG=72040 TEST=none R=erg@chromium.org,estade@chromium.org Review URL: http://codereview.chromium.org/6719006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79279 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 79211 - Convert some WidgetWin construction to use CreateParams.ben@chromium.org2011-03-237-26/+18
| | | | | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6719006 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/6696053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79212 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some WidgetWin construction to use CreateParams.ben@chromium.org2011-03-237-18/+26
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6719006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79211 0039d316-1c4b-4281-b951-d872f2087c98
* Amending issue 6716024saintlou@chromium.org2011-03-232-6/+5
| | | | | | | | | | BUG=76976 TEST=none Review URL: http://codereview.chromium.org/6705028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79163 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor: Move gfx/compositor* to gfx/compositor/backer@chromium.org2011-03-231-1/+1
| | | | | | | | | | | compositor_gl.cc (in gfx) depends on app_base (for gl_bindings), but app_base depends on gfx. This gets rid of the cyclic dependency. It is part of the larger effort to move app/gfx/gl to ui/gfx/gl. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/6718034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79127 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for issue =76919 and added --keep-mouse-cursor (76976)saintlou@chromium.org2011-03-233-1/+22
| | | | | | | | | | | | (note this is a resubmit of Issue 6718004) BUG=76919, 76976 TEST=none Review URL: http://codereview.chromium.org/6716024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79086 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes an "inverse sense" glitch in SetCreateParams(). We should only set ↵ben@chromium.org2011-03-211-1/+1
| | | | | | | | | | | WS_EX_TRANSPARENT if accept_events is false. BUG=none TEST=none TBR=sky Review URL: http://codereview.chromium.org/6708064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78912 0039d316-1c4b-4281-b951-d872f2087c98
* Add CreateParams to Widget, and replace CreatePopupWidget with CreateParams.ben@chromium.org2011-03-216-52/+115
| | | | | | | | BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6712008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78893 0039d316-1c4b-4281-b951-d872f2087c98
* WidgetGtk: connect to "map" signal instead of "show".sadrul@chromium.org2011-03-182-2/+8
| | | | | | | | | | | | | | If a GtkWidget is gtk_widget_show'n before its parent widget, then the child widget will not have a GdkWindow when "show" triggers. "map" is a more appropriate signal to do something on the GdkWindow after it's created and drawable. BUG=76573 TEST=CollectedCookiesTest.* Review URL: http://codereview.chromium.org/6688028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78719 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug with drop arrow updating on the tabstrip. See comment in widget_win.ccben@chromium.org2011-03-172-3/+16
| | | | | | | | | http://crbug.com/74764 TEST=none Review URL: http://codereview.chromium.org/6665050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78545 0039d316-1c4b-4281-b951-d872f2087c98
* Force an expose event from the "show" callback.sadrul@chromium.org2011-03-171-0/+6
| | | | | | | | | | | | This fixes the delayed display of menus, where the menu (wrench menu, context menus) shows up some time (sometimes 10+ seconds) after clicking. BUG=76085 TEST=none Review URL: http://codereview.chromium.org/6665030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78481 0039d316-1c4b-4281-b951-d872f2087c98
* Moving over to other folder button while opening folder menu should open the ↵oshima@google.com2011-03-162-6/+12
| | | | | | | | | | | | | | | folder menu. It was failing with DCHECK instead. This CL fix this issue by Canceling menu only when the menu has x grab. I also separated grk grab broke and X grab broke because gtk broke require releasing x grab for this case. BUG=chromium-os:13151 TEST=see bug description. Review URL: http://codereview.chromium.org/6676032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78447 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder some views::View overrides & other functions.msw@chromium.org2011-03-162-32/+36
| | | | | | | | | | | | | Follow base class ordering and access specifiers. Add OVERRIDE keyword where applicable. Define BaseTab::set_animation_container out of line, update includes. Limit RenderWidgetHostViewViews::OnTouchEvent to TOUCH_UI. Make RenderWidgetHostViewViews::GetCursorForPoint a virtual override. Review URL: http://codereview.chromium.org/6673070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78416 0039d316-1c4b-4281-b951-d872f2087c98
* Re-lands:ben@chromium.org2011-03-165-64/+62
| | | | | | | | | | | | Add native capture API to Widget, and fix a bug in Window where we wouldn't let the window be closed from the X. BUG=72040 TEST=none R=sky Review URL: http://codereview.chromium.org/6670049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78394 0039d316-1c4b-4281-b951-d872f2087c98
* Add a TODO, remove NOTIMPLEMENTED to quiet things down.sadrul@chromium.org2011-03-151-1/+1
| | | | | | TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78251 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 78222 - Add native capture API to Widget, and fix a bug in Window ↵ben@chromium.org2011-03-155-61/+63
| | | | | | | | | | | | | | | where we wouldn't let the window be closed from the X. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6697016 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/6695028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78241 0039d316-1c4b-4281-b951-d872f2087c98
* Add native capture API to Widget, and fix a bug in Window where we wouldn't ↵ben@chromium.org2011-03-155-63/+61
| | | | | | | | | | | | let the window be closed from the X. BUG=72040 TEST=none TBR=sky Review URL: http://codereview.chromium.org/6697016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78222 0039d316-1c4b-4281-b951-d872f2087c98