OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/cast_config_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 bool CastConfigDelegateChromeos::HasOptions() const { | 103 bool CastConfigDelegateChromeos::HasOptions() const { |
104 return true; | 104 return true; |
105 } | 105 } |
106 | 106 |
107 void CastConfigDelegateChromeos::LaunchCastOptions() { | 107 void CastConfigDelegateChromeos::LaunchCastOptions() { |
108 chrome::NavigateParams params( | 108 chrome::NavigateParams params( |
109 ProfileManager::GetActiveUserProfile(), | 109 ProfileManager::GetActiveUserProfile(), |
110 FindCastExtension()->GetResourceURL("options.html"), | 110 FindCastExtension()->GetResourceURL("options.html"), |
111 ui::PAGE_TRANSITION_LINK); | 111 ui::PAGE_TRANSITION_LINK); |
112 params.disposition = NEW_FOREGROUND_TAB; | 112 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
113 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 113 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
114 chrome::Navigate(¶ms); | 114 chrome::Navigate(¶ms); |
115 } | 115 } |
116 | 116 |
117 void CastConfigDelegateChromeos::AddObserver( | 117 void CastConfigDelegateChromeos::AddObserver( |
118 ash::CastConfigDelegate::Observer* observer) { | 118 ash::CastConfigDelegate::Observer* observer) { |
119 return extensions::CastDeviceUpdateListeners::Get(GetProfile()) | 119 return extensions::CastDeviceUpdateListeners::Get(GetProfile()) |
120 ->AddObserver(observer); | 120 ->AddObserver(observer); |
121 } | 121 } |
122 | 122 |
123 void CastConfigDelegateChromeos::RemoveObserver( | 123 void CastConfigDelegateChromeos::RemoveObserver( |
124 ash::CastConfigDelegate::Observer* observer) { | 124 ash::CastConfigDelegate::Observer* observer) { |
125 return extensions::CastDeviceUpdateListeners::Get(GetProfile()) | 125 return extensions::CastDeviceUpdateListeners::Get(GetProfile()) |
126 ->RemoveObserver(observer); | 126 ->RemoveObserver(observer); |
127 } | 127 } |
128 | 128 |
129 } // namespace chromeos | 129 } // namespace chromeos |
OLD | NEW |