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

Unified Diff: chrome/browser/chromeos/frame/bubble_window.cc

Issue 7566023: Enabled BubbleWindowViews class for the Pure Views case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged 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 | chrome/browser/chromeos/frame/bubble_window_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/frame/bubble_window.cc
diff --git a/chrome/browser/chromeos/frame/bubble_window.cc b/chrome/browser/chromeos/frame/bubble_window.cc
index 580661623a979a7739088776c6b8ab8292751af7..86af61574d97bc97ef975af4804e6ca651401525 100644
--- a/chrome/browser/chromeos/frame/bubble_window.cc
+++ b/chrome/browser/chromeos/frame/bubble_window.cc
@@ -7,6 +7,7 @@
#include <gtk/gtk.h>
#include "chrome/browser/chromeos/frame/bubble_frame_view.h"
+#include "chrome/browser/chromeos/frame/bubble_window_views.h"
#include "ui/gfx/skia_utils_gtk.h"
#include "views/window/non_client_view.h"
@@ -115,6 +116,27 @@ views::Widget* BubbleWindow::Create(
gfx::NativeWindow parent,
BubbleWindowStyle style,
views::WidgetDelegate* widget_delegate) {
+ // TODO(saintlou): Ultimately we do not want 2 classes for BubbleWindows.
+ // After discussions with mazda@chromium.org we concluded that we could
+ // punt on an initial implementation of the STYLE_XSHAPE style which is only
+ // used when displaying the keyboard overlay. Once we have implemented
+ // gradient and other missing features of Views we can address this.
+ // Furthermore the 2 other styles (STYLE_XBAR & STYLE_THROBBER) are only used
+ // in LoginHtmlDialog::Show() which will be deprecated soon.
+ if (views::Widget::IsPureViews()) {
+ if (style != STYLE_GENERIC)
+ NOTIMPLEMENTED();
+ BubbleWindowViews* window = new BubbleWindowViews(style);
+ views::Widget::InitParams params;
+ params.delegate = widget_delegate;
+ params.parent = GTK_WIDGET(parent);
+ params.bounds = gfx::Rect();
+ params.transparent = true;
+ window->Init(params);
+ window->SetBackgroundColor();
+ return window;
+ }
+
views::Widget* window = new views::Widget;
BubbleWindow* bubble_window = new BubbleWindow(window, style);
views::Widget::InitParams params;
« no previous file with comments | « no previous file | chrome/browser/chromeos/frame/bubble_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698