| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h
" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h
" |
| 6 | 6 |
| 7 #include "ash/wm/window_util.h" | 7 #include "ash/wm/window_util.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h" | |
| 10 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 14 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 14 #include "ui/base/events/event_constants.h" |
| 15 | 15 |
| 16 ChromeLauncherAppMenuItemBrowser::ChromeLauncherAppMenuItemBrowser( | 16 ChromeLauncherAppMenuItemBrowser::ChromeLauncherAppMenuItemBrowser( |
| 17 const string16 title, | 17 const string16 title, |
| 18 const gfx::Image* icon, | 18 const gfx::Image* icon, |
| 19 Browser* browser, | 19 Browser* browser, |
| 20 bool has_leading_separator) | 20 bool has_leading_separator) |
| 21 : ChromeLauncherAppMenuItem(title, icon, has_leading_separator), | 21 : ChromeLauncherAppMenuItem(title, icon, has_leading_separator), |
| 22 browser_(browser) { | 22 browser_(browser) { |
| 23 registrar_.Add(this, | 23 registrar_.Add(this, |
| 24 chrome::NOTIFICATION_BROWSER_CLOSING, | 24 chrome::NOTIFICATION_BROWSER_CLOSING, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 52 switch (type) { | 52 switch (type) { |
| 53 case chrome::NOTIFICATION_BROWSER_CLOSING: | 53 case chrome::NOTIFICATION_BROWSER_CLOSING: |
| 54 DCHECK_EQ(browser_, content::Source<Browser>(source).ptr()); | 54 DCHECK_EQ(browser_, content::Source<Browser>(source).ptr()); |
| 55 browser_ = NULL; | 55 browser_ = NULL; |
| 56 break; | 56 break; |
| 57 | 57 |
| 58 default: | 58 default: |
| 59 NOTREACHED(); | 59 NOTREACHED(); |
| 60 } | 60 } |
| 61 } | 61 } |
| OLD | NEW |