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

Unified Diff: ui/views/mus/native_widget_mus.cc

Issue 2384083005: Revert of mus: Use TooltipManagerAura in NativeWidgetMus. (Closed)
Patch Set: Created 4 years, 2 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/views/mus/native_widget_mus.h ('k') | ui/views/widget/tooltip_manager_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 3b3696b4224e9302d3cac26cd2374e6ee4960457..fa6641d38383c44d7ef62c29b95fb2e251788c6d 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -35,9 +35,6 @@
#include "ui/gfx/path.h"
#include "ui/native_theme/native_theme_aura.h"
#include "ui/platform_window/platform_window_delegate.h"
-#include "ui/views/corewm/tooltip.h"
-#include "ui/views/corewm/tooltip_aura.h"
-#include "ui/views/corewm/tooltip_controller.h"
#include "ui/views/drag_utils.h"
#include "ui/views/mus/drag_drop_client_mus.h"
#include "ui/views/mus/drop_target_mus.h"
@@ -47,7 +44,6 @@
#include "ui/views/mus/window_tree_host_mus.h"
#include "ui/views/widget/drop_helper.h"
#include "ui/views/widget/native_widget_aura.h"
-#include "ui/views/widget/tooltip_manager_aura.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/custom_frame_view.h"
#include "ui/wm/core/base_focus_rules.h"
@@ -593,14 +589,6 @@
void NativeWidgetMus::OnPlatformWindowClosed() {
native_widget_delegate_->OnNativeWidgetDestroying();
- tooltip_manager_.reset();
- if (tooltip_controller_.get()) {
- window_tree_host_->window()->RemovePreTargetHandler(
- tooltip_controller_.get());
- aura::client::SetTooltipClient(window_tree_host_->window(), NULL);
- tooltip_controller_.reset();
- }
-
window_tree_client_.reset(); // Uses |content_|.
capture_client_.reset(); // Uses |content_|.
@@ -731,15 +719,6 @@
drop_helper_ = base::MakeUnique<DropHelper>(GetWidget()->GetRootView());
aura::client::SetDragDropDelegate(content_, this);
- if (params.type != Widget::InitParams::TYPE_TOOLTIP) {
- tooltip_manager_ = base::MakeUnique<TooltipManagerAura>(GetWidget());
- tooltip_controller_ = base::MakeUnique<corewm::TooltipController>(
- base::MakeUnique<corewm::TooltipAura>());
- aura::client::SetTooltipClient(window_tree_host_->window(),
- tooltip_controller_.get());
- window_tree_host_->window()->AddPreTargetHandler(tooltip_controller_.get());
- }
-
// TODO(erg): Remove this check when ash/mus/move_event_handler.cc's
// direct usage of ui::Window::SetPredefinedCursor() is switched to a
// private method on WindowManagerClient.
@@ -863,7 +842,8 @@
}
TooltipManager* NativeWidgetMus::GetTooltipManager() const {
- return tooltip_manager_.get();
+ // NOTIMPLEMENTED();
+ return nullptr;
}
void NativeWidgetMus::SetCapture() {
@@ -1405,12 +1385,8 @@
}
void NativeWidgetMus::OnMouseEvent(ui::MouseEvent* event) {
+ // TODO(sky): forward to tooltipmanager. See NativeWidgetDesktopAura.
DCHECK(content_->IsVisible());
-
- if (tooltip_manager_.get())
- tooltip_manager_->UpdateTooltip();
- TooltipManagerAura::UpdateTooltipManagerForCapture(GetWidget());
-
native_widget_delegate_->OnMouseEvent(event);
// WARNING: we may have been deleted.
}
« no previous file with comments | « ui/views/mus/native_widget_mus.h ('k') | ui/views/widget/tooltip_manager_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698