Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1060)

Unified Diff: ui/wm/public/scoped_tooltip_disabler.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/wm/public/scoped_tooltip_disabler.h ('k') | ui/wm/public/tooltip_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/public/scoped_tooltip_disabler.cc
diff --git a/ui/wm/public/scoped_tooltip_disabler.cc b/ui/wm/public/scoped_tooltip_disabler.cc
deleted file mode 100644
index 45a39ca6a9ef2174148783c02db02548d8ebd5d4..0000000000000000000000000000000000000000
--- a/ui/wm/public/scoped_tooltip_disabler.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/wm/public/scoped_tooltip_disabler.h"
-
-#include "ui/aura/window.h"
-#include "ui/wm/public/tooltip_client.h"
-
-namespace aura {
-namespace client {
-
-ScopedTooltipDisabler::ScopedTooltipDisabler(aura::Window* window)
- : root_(window ? window->GetRootWindow() : NULL) {
- if (root_) {
- root_->AddObserver(this);
- TooltipClient* client = GetTooltipClient(root_);
- if (client)
- client->SetTooltipsEnabled(false);
- }
-}
-
-ScopedTooltipDisabler::~ScopedTooltipDisabler() {
- EnableTooltips();
-}
-
-void ScopedTooltipDisabler::EnableTooltips() {
- if (!root_)
- return;
- TooltipClient* client = GetTooltipClient(root_);
- if (client)
- client->SetTooltipsEnabled(true);
- root_->RemoveObserver(this);
- root_ = NULL;
-}
-
-void ScopedTooltipDisabler::OnWindowDestroying(aura::Window* window) {
- EnableTooltips();
-}
-
-
-} // namespace client
-} // namespace aura
« no previous file with comments | « ui/wm/public/scoped_tooltip_disabler.h ('k') | ui/wm/public/tooltip_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698