OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_new_window_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h" |
6 | 6 |
7 #include "ash/wm/window_util.h" | 7 #include "ash/wm/window_util.h" |
8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
9 #include "chrome/browser/sessions/tab_restore_service.h" | 9 #include "chrome/browser/sessions/tab_restore_service.h" |
10 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 10 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 tab_restore_service_(service) { | 48 tab_restore_service_(service) { |
49 tab_restore_service_->AddObserver(this); | 49 tab_restore_service_->AddObserver(this); |
50 } | 50 } |
51 | 51 |
52 virtual ~TabRestoreHelper() { | 52 virtual ~TabRestoreHelper() { |
53 tab_restore_service_->RemoveObserver(this); | 53 tab_restore_service_->RemoveObserver(this); |
54 } | 54 } |
55 | 55 |
56 TabRestoreService* tab_restore_service() { return tab_restore_service_; } | 56 TabRestoreService* tab_restore_service() { return tab_restore_service_; } |
57 | 57 |
58 virtual void TabRestoreServiceChanged(TabRestoreService* service) OVERRIDE { | 58 virtual void TabRestoreServiceChanged(TabRestoreService* service) override { |
59 } | 59 } |
60 | 60 |
61 virtual void TabRestoreServiceDestroyed(TabRestoreService* service) OVERRIDE { | 61 virtual void TabRestoreServiceDestroyed(TabRestoreService* service) override { |
62 // This destroys us. | 62 // This destroys us. |
63 delegate_->tab_restore_helper_.reset(); | 63 delegate_->tab_restore_helper_.reset(); |
64 } | 64 } |
65 | 65 |
66 virtual void TabRestoreServiceLoaded(TabRestoreService* service) OVERRIDE { | 66 virtual void TabRestoreServiceLoaded(TabRestoreService* service) override { |
67 RestoreTabUsingProfile(profile_); | 67 RestoreTabUsingProfile(profile_); |
68 // This destroys us. | 68 // This destroys us. |
69 delegate_->tab_restore_helper_.reset(); | 69 delegate_->tab_restore_helper_.reset(); |
70 } | 70 } |
71 | 71 |
72 private: | 72 private: |
73 ChromeNewWindowDelegate* delegate_; | 73 ChromeNewWindowDelegate* delegate_; |
74 Profile* profile_; | 74 Profile* profile_; |
75 TabRestoreService* tab_restore_service_; | 75 TabRestoreService* tab_restore_service_; |
76 | 76 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 void ChromeNewWindowDelegate::ShowTaskManager() { | 125 void ChromeNewWindowDelegate::ShowTaskManager() { |
126 chrome::OpenTaskManager(NULL); | 126 chrome::OpenTaskManager(NULL); |
127 } | 127 } |
128 | 128 |
129 void ChromeNewWindowDelegate::OpenFeedbackPage() { | 129 void ChromeNewWindowDelegate::OpenFeedbackPage() { |
130 chrome::OpenFeedbackDialog(GetBrowserForActiveWindow()); | 130 chrome::OpenFeedbackDialog(GetBrowserForActiveWindow()); |
131 } | 131 } |
OLD | NEW |