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

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: move functionality of wm ipc out of browser so that views/bubble can use it. 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
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..e8558cc5926777107af2e0fea817d5011af3fb12 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -4,10 +4,17 @@
#include "ui/views/bubble/bubble_delegate.h"
+#include <vector>
+
#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 "views/widget/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,9 +34,21 @@ 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());
+ views::chromeos::WmIpc::instance()->SetWindowType(
+ bubble_widget->GetNativeView(),
+ ::chromeos::WM_IPC_WINDOW_CHROME_INFO_BUBBLE,
+ &params);
+ }
+#endif
return bubble_widget;
}
+bool SetLegacyChromeosWindowType();
+
#if defined(OS_WIN) && !defined(USE_AURA)
// The border widget's delegate, needed for transparent Windows native controls.
// TODO(msw): Remove this when Windows native controls are no longer needed.
@@ -79,7 +98,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 +116,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));
}

Powered by Google App Engine
This is Rietveld 408576698