| OLD | NEW |
| 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 #import <Carbon/Carbon.h> | 5 #import <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "chrome/browser/tab_contents/popup_menu_helper_mac.h" | 7 #include "chrome/browser/tab_contents/popup_menu_helper_mac.h" |
| 8 | 8 |
| 9 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } else { | 73 } else { |
| 74 render_view_host_->DidCancelPopupMenu(); | 74 render_view_host_->DidCancelPopupMenu(); |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 void PopupMenuHelper::Observe( | 78 void PopupMenuHelper::Observe( |
| 79 int type, | 79 int type, |
| 80 const NotificationSource& source, | 80 const NotificationSource& source, |
| 81 const NotificationDetails& details) { | 81 const NotificationDetails& details) { |
| 82 DCHECK(type == content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED); | 82 DCHECK(type == content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED); |
| 83 RenderViewHost* rvh = Source<RenderViewHost>(source).ptr(); | 83 DCHECK(Source<RenderWidgetHost>(source).ptr() == render_view_host_); |
| 84 DCHECK_EQ(render_view_host_, rvh); | |
| 85 render_view_host_ = NULL; | 84 render_view_host_ = NULL; |
| 86 } | 85 } |
| 87 | 86 |
| OLD | NEW |