| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/tab_closeable_state_watcher.h" | 5 #include "chrome/browser/chromeos/tab_closeable_state_watcher.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/browser_shutdown.h" | 8 #include "chrome/browser/browser_shutdown.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 11 #include "chrome/browser/tab_contents/tab_contents_view.h" | |
| 12 #include "chrome/browser/tabs/tab_strip_model.h" | 10 #include "chrome/browser/tabs/tab_strip_model.h" |
| 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 14 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
| 16 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
| 15 #include "content/browser/tab_contents/tab_contents.h" |
| 16 #include "content/browser/tab_contents/tab_contents_view.h" |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 //////////////////////////////////////////////////////////////////////////////// | 20 //////////////////////////////////////////////////////////////////////////////// |
| 21 // TabCloseableStateWatcher::TabStripWatcher, public: | 21 // TabCloseableStateWatcher::TabStripWatcher, public: |
| 22 | 22 |
| 23 TabCloseableStateWatcher::TabStripWatcher::TabStripWatcher( | 23 TabCloseableStateWatcher::TabStripWatcher::TabStripWatcher( |
| 24 TabCloseableStateWatcher* main_watcher, const Browser* browser) | 24 TabCloseableStateWatcher* main_watcher, const Browser* browser) |
| 25 : main_watcher_(main_watcher), | 25 : main_watcher_(main_watcher), |
| 26 browser_(browser) { | 26 browser_(browser) { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 if (!can_close_tab_) | 245 if (!can_close_tab_) |
| 246 return false; | 246 return false; |
| 247 | 247 |
| 248 // Otherwise, close existing tabs, and deny closing of browser. | 248 // Otherwise, close existing tabs, and deny closing of browser. |
| 249 // TabClosingAt will open NTP when the last tab is being closed. | 249 // TabClosingAt will open NTP when the last tab is being closed. |
| 250 *action_type = OPEN_NTP; | 250 *action_type = OPEN_NTP; |
| 251 return false; | 251 return false; |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace chromeos | 254 } // namespace chromeos |
| OLD | NEW |