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

Unified Diff: ui/views/bubble/bubble_delegate.cc

Issue 8604012: move chromeos bubble setup code to window.cc (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update Created 9 years, 1 month 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
« ui/views/bubble/bubble_delegate.h ('K') | « ui/views/bubble/bubble_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index bffe75541aae3dbad86efea2fdf1fa34f84eabce..5955bc0af843ae733bd713cc4faa794e1784a2dc 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -2,12 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <vector>
Daniel Erat 2011/11/21 16:59:09 bubble_delegate.h should be included before anythi
alicet1 2011/11/21 20:58:45 Done.
+
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "views/widget/widget.h"
+#if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK)
+#include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h"
+#include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h"
+#endif
+
// The duration of the fade animation in milliseconds.
static const int kHideFadeDurationMS = 200;
@@ -27,6 +34,16 @@ Widget* CreateBubbleWidget(BubbleDelegateView* bubble, Widget* parent) {
bubble_params.transparent = false;
#endif
bubble_widget->Init(bubble_params);
+#if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK)
+ {
+ std::vector<int> params;
+ params.push_back(bubble->show_while_screen_is_locked());
+ chromeos::WmIpc::instance()->SetWindowType(
+ bubble_widget->GetNativeView(),
+ chromeos::WM_IPC_WINDOW_CHROME_INFO_BUBBLE,
+ &params);
+ }
+#endif
return bubble_widget;
}
@@ -79,7 +96,8 @@ BubbleDelegateView::BubbleDelegateView()
arrow_location_(BubbleBorder::TOP_LEFT),
color_(SK_ColorWHITE),
border_widget_(NULL),
- use_focusless_(false) {
+ use_focusless_(false),
+ show_while_screen_is_locked_(false) {
set_background(views::Background::CreateSolidBackground(color_));
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, 0));
}
@@ -96,7 +114,8 @@ BubbleDelegateView::BubbleDelegateView(
color_(color),
original_opacity_(255),
border_widget_(NULL),
- use_focusless_(false) {
+ use_focusless_(false),
+ show_while_screen_is_locked_(false) {
set_background(views::Background::CreateSolidBackground(color_));
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, 0));
}
« ui/views/bubble/bubble_delegate.h ('K') | « ui/views/bubble/bubble_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698