Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3151)

Unified Diff: chrome/browser/chromeos/setting_level_bubble.cc

Issue 7572016: System bubbles work with webui login display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ups fix Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/setting_level_bubble.cc
diff --git a/chrome/browser/chromeos/setting_level_bubble.cc b/chrome/browser/chromeos/setting_level_bubble.cc
index 8af98bf6e8c55162a2b9e946e9ecd6469218c9e5..e6b5176909a6f3512c0241da407c700a605bfee8 100644
--- a/chrome/browser/chromeos/setting_level_bubble.cc
+++ b/chrome/browser/chromeos/setting_level_bubble.cc
@@ -9,6 +9,7 @@
#include "base/timer.h"
#include "chrome/browser/chromeos/login/background_view.h"
#include "chrome/browser/chromeos/login/login_utils.h"
+#include "chrome/browser/chromeos/login/webui_login_display.h"
#include "chrome/browser/chromeos/setting_level_bubble_view.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
@@ -65,10 +66,10 @@ static views::Widget* GetToplevelWidget() {
window = GTK_WINDOW(background->GetNativeWindow());
}
- if (!window)
- return NULL;
-
- return views::Widget::GetWidgetForNativeWindow(window);
+ if (window)
+ return views::Widget::GetWidgetForNativeWindow(window);
+ else
+ return WebUILoginDisplay::GetLoginWindow();
}
SettingLevelBubble::SettingLevelBubble(SkBitmap* increase_icon,
@@ -102,8 +103,10 @@ void SettingLevelBubble::ShowBubble(int percent) {
if (!bubble_) {
views::Widget* parent_widget = GetToplevelWidget();
- if (parent_widget == NULL)
+ if (parent_widget == NULL) {
+ LOG(WARNING) << "Unable to locate parent widget to display a bubble";
return;
+ }
DCHECK(view_ == NULL);
view_ = new SettingLevelBubbleView;
view_->Init(icon, previous_percent_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698