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

Side by Side Diff: views/widget/native_widget_aura.cc

Issue 8418028: Destroy tooltip manager if the native window is destroyed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | views/widget/tooltip_manager_views.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/widget/native_widget_aura.h" 5 #include "views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/desktop.h" 8 #include "ui/aura/desktop.h"
9 #include "ui/aura/event.h" 9 #include "ui/aura/event.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 void NativeWidgetAura::OnCaptureLost() { 528 void NativeWidgetAura::OnCaptureLost() {
529 delegate_->OnMouseCaptureLost(); 529 delegate_->OnMouseCaptureLost();
530 } 530 }
531 531
532 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) { 532 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) {
533 delegate_->OnNativeWidgetPaint(canvas); 533 delegate_->OnNativeWidgetPaint(canvas);
534 } 534 }
535 535
536 void NativeWidgetAura::OnWindowDestroying() { 536 void NativeWidgetAura::OnWindowDestroying() {
537 delegate_->OnNativeWidgetDestroying(); 537 delegate_->OnNativeWidgetDestroying();
538
539 // If the aura::Window is destryoed, we can no longer show tooltips.
sky 2011/10/28 18:26:33 'destryoed' -> destroyed
varunjain 2011/10/28 18:35:16 Done.
540 if (tooltip_manager_.get())
sky 2011/10/28 18:26:33 Not need to check this, just do reset.
varunjain 2011/10/28 18:35:16 Done.
541 tooltip_manager_.reset();
538 } 542 }
539 543
540 void NativeWidgetAura::OnWindowDestroyed() { 544 void NativeWidgetAura::OnWindowDestroyed() {
541 window_ = NULL; 545 window_ = NULL;
542 delegate_->OnNativeWidgetDestroyed(); 546 delegate_->OnNativeWidgetDestroyed();
543 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) 547 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET)
544 delete this; 548 delete this;
545 } 549 }
546 550
547 void NativeWidgetAura::OnWindowVisibilityChanged(bool visible) { 551 void NativeWidgetAura::OnWindowVisibilityChanged(bool visible) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 } 638 }
635 639
636 // static 640 // static
637 bool NativeWidgetPrivate::IsMouseButtonDown() { 641 bool NativeWidgetPrivate::IsMouseButtonDown() {
638 NOTIMPLEMENTED(); 642 NOTIMPLEMENTED();
639 return false; 643 return false;
640 } 644 }
641 645
642 } // namespace internal 646 } // namespace internal
643 } // namespace views 647 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | views/widget/tooltip_manager_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698