Commit a468a29a authored by glotov@google.com's avatar glotov@google.com

System bubbles work with webui login display

BUG=chromium-os:18305
TEST=manual

Review URL: http://codereview.chromium.org/7572016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95418 0039d316-1c4b-4281-b951-d872f2087c98
parent fbc1d277
......@@ -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_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment