summaryrefslogtreecommitdiffstats
path: root/ui/views/widget
Commit message (Collapse)AuthorAgeFilesLines
* Remove set of redundant API calls for PlatformDevice instances. These ↵twiz@chromium.org2011-06-161-1/+1
| | | | | | | | | | | | | | | functions were duplicated for both SkCanvas and SkDevice instances. This CL unifies these calls to only make use of the SkCanvas entries. This is CL part of a larger goal to remove the PlatformDevice class. BUG=None TEST=None Review URL: http://codereview.chromium.org/7168022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89410 0039d316-1c4b-4281-b951-d872f2087c98
* ui/views: Fix the signature of View::OnViewAdded/Removed overridden methods.tfarina@chromium.org2011-06-082-4/+4
| | | | | | | | | | | | | | | | | The signature changed from (commit bf2f7326): virtual void OnViewAdded(View* parent, View* child); To: virtual void OnViewAdded(const View& parent, const View& child); BUG=72040 TEST=None R=ben@chromium.org,sky@chromium.org,pkasting@chromium.org Review URL: http://codereview.chromium.org/7104042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88392 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage... these files were ommited from the CL.ben@chromium.org2011-05-191-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85911 0039d316-1c4b-4281-b951-d872f2087c98
* Move SystemMonitor to base/.willchan@chromium.org2011-05-181-1/+1
| | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | 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
* Removes code added to track down crash. The crash seems to havesky@chromium.org2011-04-151-2/+0
| | | | | | | | | | | | | | | | | | | | 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
* 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
* Consolidate Widget Event code, other cleanup.msw@chromium.org2011-03-313-24/+7
| | | | | | | | | | | | | 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
* Move some files from base to base/memory.levin@chromium.org2011-03-285-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update OnMouseActivate override signatures.msw@chromium.org2011-03-091-16/+16
| | | | | | | | | | | | Add OVERRIDE keyword liberally to some relevant overrides. Fix copyright dates. BUG=75366 TEST=Omnibox clicking, etc. Review URL: http://codereview.chromium.org/6648018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77431 0039d316-1c4b-4281-b951-d872f2087c98
* Update LocatedEvent and MouseWheelEvent.msw@chromium.org2011-02-252-4/+6
| | | | | | | | | | | | | | | Refactor RootView::OnMouseWheel and WidgetGtk::ProcessScroll. Rename RootView's and MenuHostRootView's ProcessMouseWheelEvent to OnMouseWheel. Merge event_x's GetMouseEventType into EventTypeFromNative and detect wheel events. Update NativeWidgetWin::MakeMSG and WidgetWin::MakeMSG. Add some needed support functions. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6469106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76001 0039d316-1c4b-4281-b951-d872f2087c98
* View API/implementation cleanup:pkasting@chromium.org2011-02-222-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't include the container type ("vector") in the typedef for "a bunch of children". Users generally should not know or care what the container is, so this makes reading easier as the code is not constantly pointing out to you, "hey! I'm a vector!" Added bonus: less verbose, allows condensing a lot of loop declarations onto one line. * Consistently put getters before setters. * Remove 4-arg form of SetBounds() and make people use Rects (we should move the codebase towards Points, Sizes, and Rects wherever possible). * Use "origin" instead of "position" to be consistent with Rect's terminology. * Minor naming changes, e.g. GetViewById() -> GetViewByID(). * Remove const qualifier on member functions that are not logically const. This also got rid of all the const_cast<>()s. * Better comments. * Use const ref args for Views whenever the provided View is not being modified, to make that obvious to the caller. * Turn some accessors into pairs of (non-const, const) accessors. In these cases make the non-const version call the const version. (GetWidget() does this in the header because the const version is virtual; this way people who override the const version can see why they don't need to override the non-const version). * Make RemoveChildView() take a bool for consistency with RemoveAllChildViews() (also eliminates the need to return a View*). * Add STL-style iterators and rename a few accessors to match STL terminology ("size" instead of "count"). * Turn IsFocusable() into a cheap inline getter. * Greatly simplify private tree ops ("NotifyHierarchyChangedXXX()") by realizing that they were always being called with |parent| == |this|. * Declare iterators inside loops, not above them. * Standardize iterator naming to |i|. The existing code wasn't always consistent, and while there's nothing wrong with |it|, using that would have made almost every loop declaration into two lines instead of one. * Simpler code, sometimes by using STL algorithms. * Unindent via early-returns. * Use CHECK_NE() and similar where possible. * Fix memory corruption in RemoveAllChildViews() due to using an iterator after modifying its container. BUG=none TEST=none Review URL: http://codereview.chromium.org/6541030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75642 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate Event API methods to Google Style.ben@chromium.org2011-02-101-4/+4
| | | | | | | | | | | | | | 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
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-052-4/+4
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Complete the Focus Manager hookup.ben@chromium.org2011-02-034-6/+42
| | | | | | | | | | | | | - Temporarily patch in old Focus Sibling initialization code. - Improve the constness of FocusSearch - Simplify ContainsView method in FocusManager BUG=none TEST=none Review URL: http://codereview.chromium.org/6349080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73632 0039d316-1c4b-4281-b951-d872f2087c98
* Verify that:ben@chromium.org2011-02-034-1/+55
| | | | | | | | | | | | - RequestFocus() works. - Removing the focused view from the view hierarchy resets the focused view in the FocusManager. BUG=none TEST=unittest Review URL: http://codereview.chromium.org/6286073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73621 0039d316-1c4b-4281-b951-d872f2087c98
* More FocusManager hookup.ben@chromium.org2011-02-0310-25/+151
| | | | | | | | | | | | | | - One focus manager per Widget hierarchy - Create focus manager on widget initialization - Allow focus manager to be obtained from NativeView. - Adds a test to ensure focus manager is only created for the top level widget. BUG=none TEST=none Review URL: http://codereview.chromium.org/6349057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73551 0039d316-1c4b-4281-b951-d872f2087c98
* Begin to integrate Focus Manager. Add Windows accelerator handler ↵ben@chromium.org2011-02-025-2/+150
| | | | | | | | | | | implementation (commented out now due to lack of focus manager). Add some utilities to NativeWidget for obtaining NativeWidget from a NativeView. BUG=none TEST=none Review URL: http://codereview.chromium.org/6286035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73479 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder methods in class View to better isolate methods that shouldn't be ↵ben@chromium.org2011-02-011-2/+2
| | | | | | | | | | | | | public. Specifically, move most event handlers and processing functions to protected now that RootView is a friend. BUG=none TEST=compiles, existing unittests Review URL: http://codereview.chromium.org/6286032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73376 0039d316-1c4b-4281-b951-d872f2087c98
* sFirst cut at an experiment with what a simplified View/Widget API would ↵ben@chromium.org2011-02-0113-0/+1644
look like. Of note: - Widget is a cross-platform class encapsulating widget-specific state - NativeWidget interface wraps different implementations of a native widget. Starting with HWND. - NativeWidget implementation should eventually be swappable at runtime. - Simpler Event construction directly from a NativeEvent (e.g. MSG struct) - Simpler View API with fewer, more clearly delineated overrides. Notes: - Window* are just empty files for now while I get View/Widget to work. BUG=none TEST=see unittests, in development Review URL: http://codereview.chromium.org/6286013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73353 0039d316-1c4b-4281-b951-d872f2087c98