| 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/protector/settings_change_global_error.h" | 5 #include "chrome/browser/protector/settings_change_global_error.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 if (!closed_by_button_) { | 173 if (!closed_by_button_) { |
| 174 BrowserThread::PostDelayedTask( | 174 BrowserThread::PostDelayedTask( |
| 175 BrowserThread::UI, FROM_HERE, | 175 BrowserThread::UI, FROM_HERE, |
| 176 base::Bind(&SettingsChangeGlobalError::OnInactiveTimeout, | 176 base::Bind(&SettingsChangeGlobalError::OnInactiveTimeout, |
| 177 weak_factory_.GetWeakPtr()), | 177 weak_factory_.GetWeakPtr()), |
| 178 base::TimeDelta::FromMilliseconds(kMenuItemDisplayPeriodMs)); | 178 base::TimeDelta::FromMilliseconds(kMenuItemDisplayPeriodMs)); |
| 179 #if !defined(TOOLKIT_GTK) | 179 #if !defined(TOOLKIT_GTK) |
| 180 // TODO(ivankr): the logic for redisplaying bubble is disabled on Gtk, see | 180 // TODO(ivankr): the logic for redisplaying bubble is disabled on Gtk, see |
| 181 // http://crbug.com/115719. | 181 // http://crbug.com/115719. |
| 182 if (browser->window() && | 182 if (browser->window() && |
| 183 !platform_util::IsWindowActive(browser->window()->GetNativeHandle())) { | 183 !platform_util::IsWindowActive(browser->window()->GetNativeWindow())) { |
| 184 // Bubble closed because the entire window lost activation, display | 184 // Bubble closed because the entire window lost activation, display |
| 185 // again when a window gets active. | 185 // again when a window gets active. |
| 186 show_on_browser_activation_ = true; | 186 show_on_browser_activation_ = true; |
| 187 } | 187 } |
| 188 #endif | 188 #endif |
| 189 } else { | 189 } else { |
| 190 RemoveFromProfile(); | 190 RemoveFromProfile(); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 weak_factory_.InvalidateWeakPtrs(); | 227 weak_factory_.InvalidateWeakPtrs(); |
| 228 ShowBubbleView(browser); | 228 ShowBubbleView(browser); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void SettingsChangeGlobalError::OnInactiveTimeout() { | 231 void SettingsChangeGlobalError::OnInactiveTimeout() { |
| 232 delegate_->OnDecisionTimeout(this); | 232 delegate_->OnDecisionTimeout(this); |
| 233 RemoveFromProfile(); | 233 RemoveFromProfile(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace protector | 236 } // namespace protector |
| OLD | NEW |