summaryrefslogtreecommitdiffstats
path: root/ash/shelf/shelf_tooltip_manager.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert of Refine ash shelf tooltip closing on non-mash ChromeOS. (patchset ↵msw2016-03-261-56/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #4 id:60001 of https://codereview.chromium.org/1828133004/ ) Reason for revert: Memory failures, eg. https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20ChromeOS%20MSan%20Tests/builds/8340 Original issue's description: > Refine ash shelf tooltip closing on non-mash ChromeOS. > > Fixes a regression from: https://codereview.chromium.org/1816753002 > Also reverse expected behavior for touching tooltips. > (closes on stable, tests expected them to stay open...) > > Inline bubble function definitions. > Call WillDeleteShelf earlier to fix a test crash... > TODO: Encapsulate more ShelfLayoutManager code. > > BUG=595853 > TEST=ChromeOS tooltips stay open on hover; close for external touches. > R=sky@chromium.org > > Committed: https://crrev.com/1a0d283fa81e19b47fb85523f28c4a03f7dc1d24 > Cr-Commit-Position: refs/heads/master@{#383404} TBR=sky@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=595853 Review URL: https://codereview.chromium.org/1836753002 Cr-Commit-Position: refs/heads/master@{#383444}
* Refine ash shelf tooltip closing on non-mash ChromeOS.msw2016-03-251-60/+56
| | | | | | | | | | | | | | | | | | Fixes a regression from: https://codereview.chromium.org/1816753002 Also reverse expected behavior for touching tooltips. (closes on stable, tests expected them to stay open...) Inline bubble function definitions. Call WillDeleteShelf earlier to fix a test crash... TODO: Encapsulate more ShelfLayoutManager code. BUG=595853 TEST=ChromeOS tooltips stay open on hover; close for external touches. R=sky@chromium.org Review URL: https://codereview.chromium.org/1828133004 Cr-Commit-Position: refs/heads/master@{#383404}
* Enable mash shelf tooltips.msw2016-03-231-241/+91
| | | | | | | | | | | | | | | | | | | | | | | | | Make ShelfItemDelegateMus::ShouldShowTooltip() return true. Put sysui menu/bubble widgets in mus's MENUS container. (bubbles are used for shelf tooltips and volume/etc. settings) Put sysui tooltip widgets in mus's TOOLTIPS container. Rewrite ShelfTooltipManager as an aura::Window pre-target handler. (can't install itself as a pre-target handler for the desktop root...) Remove ShelfButtonHost; simplify ShelfButton and AppListButton. (contain event observation logic within ShelfTooltipManager) Update unit tests and helper classes; note currently broken behavior: TODO: Make tooltips close on touch events outside the shelf. TODO: Push item state to items; avoid shelf item delegates, etc. BUG=595853 TEST=mash shelf shows tooltips; no cros regressions (except not closing on touch/gesture outside shelf). R=sky@chromium.org Review URL: https://codereview.chromium.org/1816753002 Cr-Commit-Position: refs/heads/master@{#382976}
* Cleanup ash shelf accessor functions.msw2016-03-011-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove RootWindowController::ForShelf, use ForWindow instead. Remove ShelfLayoutManager::ForShelf, use Shelf::For*, etc. Avoid direct RootWindowController use with Shelf::ForWindow. Add Shelf::shelf_layout_manager() accessor via ShelfWidget. (avoid Shelf::ForWindow in shell.cc for ShelfDelegate init path) (No Shelf exists for ShelfWidget::CreateShelf's delegate init) Make ShelfView take a Shelf* pointer; not ShelfLayoutManager. Add Shelf alignment helpers to avoid ShelfLayoutManager use. Miscellaneous refactoring of shelf object access callsites. TODO: Remove Shell::[G|S]etShelfAutoHideBehavior TODO: Remove Shell::[G|S]etShelfAlignment BUG=557406 TEST=No regressions or behavior changes. R=sky@chromium.org Review URL: https://codereview.chromium.org/1743493002 Cr-Commit-Position: refs/heads/master@{#378392}
* ash: Do not use MessageLoopForUI when not needed.sadrul2016-01-281-2/+2
| | | | | | | | | | | Use ThreadTaskRunnerHandle to get thet task runner, and use that for posting tasks from the ash code. BUG=none Review URL: https://codereview.chromium.org/1640503002 Cr-Commit-Position: refs/heads/master@{#372096}
* base: Template methods on Timer classes instead of the classes themselves.danakj2015-09-241-2/+1
| | | | | | | | | | | | | | | | | | | The base class for OneShotTimer and DelayedTimer is templated but only the Start method needs to be (which has a TODO to make it go away entirely too). The DelayedTimer class is also templated but only its constructor needs to be, and the type can be inferred at the callsite, so less typing all around. R=thakis@chromium.org TBR=sky,brettw BUG=148832 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1355063004 Cr-Commit-Position: refs/heads/master@{#350496}
* Fix references to ui/gfx headers in a*/.Avi Drissman2014-12-221-1/+1
| | | | | | | | | | BUG=444596 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/802473003 Cr-Commit-Position: refs/heads/master@{#309448}
* Standardize usage of virtual/override/final specifiers.dcheng2014-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=harrym@chromium.org Review URL: https://codereview.chromium.org/684643002 Cr-Commit-Position: refs/heads/master@{#302180}
* replace OVERRIDE and FINAL with override and final in ash/mostynb2014-10-031-2/+2
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/621133002 Cr-Commit-Position: refs/heads/master@{#298040}
* Refactor BubbleDelegateView::use_focuseless().vasilii@chromium.org2014-07-251-1/+1
| | | | | | | | | | | | | It's confusing because it prevents the bubble activation. As a side effect on Windows the bubble doesn't get LBUTTON_DOWN messages. The reason for that is in HWNDMessageHandler::OnMouseActivate(). It asks the bubble if it can be activated. It answers "no" due to implementation in BubbleDelegateView::CanActivate(). Windows gets MA_NOACTIVATEANDEAT and MouseDown event isn't dispatched. This is definitely unexpected. The bubbles which indeed always inactive should use set_can_activate(false) at construction time. The bubbles which can be active but created without focus by default should use ShowInactive() instead. BUG=392734 Review URL: https://codereview.chromium.org/413433002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285682 0039d316-1c4b-4281-b951-d872f2087c98
* views: Make view::Views::GetPreferredSize() const.erg@chromium.org2014-05-201-2/+2
| | | | | | | | | | | | | | | | | | | Due to button refactoring patches, we now need to ask views for their preferred sizes in const methods. Across the entire codebase, the overwhelming majority of GetPreferredSize() implementations could be const. There are only a few places where we can't, and they are usually combining the sizing and layout code. BookmarksBarView was simple enough to perform this separation. Most of the other places were solved by adding "mutable" to value caches. BUG=155363 R=jam@chromium.org, pkasting@chromium.org, scheib@chromium.org, sky@chromium.org, pkasting, sky TBR=jam, scheib Review URL: https://codereview.chromium.org/273223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271682 0039d316-1c4b-4281-b951-d872f2087c98
* Dont dismiss bubble views when window bounds changebshe@chromium.org2014-05-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | Bubble views are closed if BubbleDelegateView::move_with_anchor_ is false when bounds changing. With touch view and virtual keyboard, we dont want to dismiss bubble views on bounds change. So this CL removes BubbleDelegateView::move_with_anchor_ and make it default behavior. BUG=366767 TEST= 1. Enable Virtual keyboard (or touchview mode) 2. Enable streamlined hosted apps flag from about://flags 3. Go to any website 4. Go to hotdog menu, more tools, "Add shortcut to this website" 5. Try to change the name of the shortcut you are adding now by tapping the name textfield of the dialog that appeared 6. The dialog should not disappear, you should be able to change the name in the textfield R=msw@chromium.org, mukai@chromium.org, sadrul@chromium.org, skuhne@chromium.org, xiyuan@chromium.org Review URL: https://codereview.chromium.org/254083006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268319 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate ash::internal namespaceoshima@chromium.org2014-04-031-3/+1
| | | | | | | | | | | Plus obvious style nit fixes. BUG=None TBR=sky@chromium.org Review URL: https://codereview.chromium.org/224113005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261522 0039d316-1c4b-4281-b951-d872f2087c98
* Move wm/core to wm namespace.ben@chromium.org2014-03-141-6/+6
| | | | | | | | | | | | | | | | Also sets up new targets for wm_core, wm_core_unittests, etc. R=sky@chromium.org TBR=sky@chromium.org BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256680 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256839 Review URL: https://codereview.chromium.org/196063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257183 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Move wm/core to wm namespace."dmichael@chromium.org2014-03-131-6/+6
| | | | | | | | | | | | This reverts commit 521c703f8d62fa698c3e88287c64d8d23f9ac675. Broke gyp BUG= Review URL: https://codereview.chromium.org/199263002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256846 0039d316-1c4b-4281-b951-d872f2087c98
* Move wm/core to wm namespace.ben@chromium.org2014-03-131-6/+6
| | | | | | | | | | | | | | Also sets up new targets for wm_core, wm_core_unittests, etc. R=sky@chromium.org TBR=sky@chromium.org BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256680 Review URL: https://codereview.chromium.org/196063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256839 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Move wm/core to wm namespace."dmichael@chromium.org2014-03-121-6/+6
| | | | | | | | | | | | | | This reverts commit 067d7fe616a07011b9e2d2609fc65af8db6a7dfb. Broke the build: http://build.chromium.org/p/chromium.mac/builders/Mac%20Builder%20%28dbg%29/builds/63598/steps/compile/logs/stdio BUG= TBR=ben Review URL: https://codereview.chromium.org/198283002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256686 0039d316-1c4b-4281-b951-d872f2087c98
* Move wm/core to wm namespace.ben@chromium.org2014-03-121-6/+6
| | | | | | | | | | | | Also sets up new targets for wm_core, wm_core_unittests, etc. R=sky@chromium.org TBR=sky@chromium.org BUG= Review URL: https://codereview.chromium.org/196063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256680 0039d316-1c4b-4281-b951-d872f2087c98
* Move root_window.* to window_event_dispatcher.*ben@chromium.org2014-02-211-1/+1
| | | | | | | | | http://crbug.com/308843 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/174803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252651 0039d316-1c4b-4281-b951-d872f2087c98
* ash: Increase shelf tooltip show up delay to 1s.xiyuan@chromium.org2013-12-021-1/+1
| | | | | | | | BUG=322928 Review URL: https://codereview.chromium.org/99613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238187 0039d316-1c4b-4281-b951-d872f2087c98
* ash: Rename LauncherModel to ShelfModel.tfarina@chromium.org2013-11-141-1/+1
| | | | | | | | | | | | | * Move launcher_model.* from launcher/ to shelf/ * Rename to shelf_model.* BUG=248353 TEST=None, no functional changes R=jamescook@chromium.org,harrym@chromium.org Review URL: https://codereview.chromium.org/71653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235217 0039d316-1c4b-4281-b951-d872f2087c98
* Make GetRootWindow() return a Window instead of a RootWindow.ben@chromium.org2013-10-251-1/+1
| | | | | | | | | | | | Also adds a typedef from RootWindow to WindowEventDispatcher, the eventual name of this type. Adds a GetDispatcher() method that crawls up to the root Window and returns the WindowEventDispatcher. R=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/37733003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231077 0039d316-1c4b-4281-b951-d872f2087c98
* ash: Move launcher_view* to shelf/ directory.tfarina@chromium.org2013-10-181-8/+8
| | | | | | | | | | | BUG=248353 TEST=none, no functional changes. R=jamescook@chromium.org, xiyuan@chromium.org TBR=sky@chromium.org # for chrome/browser/ui Review URL: https://codereview.chromium.org/27628002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229274 0039d316-1c4b-4281-b951-d872f2087c98
* ash: Move TooltipManager to from launcher to shelf.tfarina@chromium.org2013-10-091-0/+379
BUG=248353 TEST=none, no functional changes. R=jamescook@chromium.org,xiyuan@chromium.org Review URL: https://codereview.chromium.org/26124002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227754 0039d316-1c4b-4281-b951-d872f2087c98