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

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

Issue 8800032: Make BubbleWindow a Widget override with a BubbleFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dtor. Created 9 years 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 | « chrome/browser/chromeos/frame/bubble_window.cc ('k') | chrome/browser/chromeos/frame/bubble_window_style.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_gtk.cc
diff --git a/chrome/browser/chromeos/frame/bubble_window_gtk.cc b/chrome/browser/chromeos/frame/bubble_window_gtk.cc
deleted file mode 100644
index 67846e64a6c5402119741553ea4c8a3535c15684..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/frame/bubble_window_gtk.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/frame/bubble_window.h"
-
-#include <gtk/gtk.h>
-
-#include "chrome/browser/chromeos/frame/bubble_frame_view.h"
-#include "ui/gfx/skia_utils_gtk.h"
-#include "ui/views/window/non_client_view.h"
-
-namespace chromeos {
-
-BubbleWindow::BubbleWindow(views::Widget* window,
- DialogStyle style)
- : views::NativeWidgetGtk(window),
- style_(style) {
-}
-
-void BubbleWindow::InitNativeWidget(const views::Widget::InitParams& params) {
- views::NativeWidgetGtk::InitNativeWidget(params);
-
- // Turn on double buffering so that the hosted GtkWidgets does not
- // flash as in http://crosbug.com/9065.
- EnableDoubleBuffer(true);
-
- GdkColor background_color =
- gfx::SkColorToGdkColor(kBubbleWindowBackgroundColor);
- gtk_widget_modify_bg(GetNativeView(), GTK_STATE_NORMAL, &background_color);
-
- // A work-around for http://crosbug.com/8538. All GdkWindow of top-level
- // GtkWindow should participate _NET_WM_SYNC_REQUEST protocol and window
- // manager should only show the window after getting notified. And we
- // should only notify window manager after at least one paint is done.
- // TODO(xiyuan): Figure out the right fix.
- gtk_widget_realize(GetNativeView());
- gdk_window_set_back_pixmap(GetNativeView()->window, NULL, FALSE);
- gtk_widget_realize(window_contents());
- gdk_window_set_back_pixmap(window_contents()->window, NULL, FALSE);
-}
-
-views::NonClientFrameView* BubbleWindow::CreateNonClientFrameView() {
- views::Widget* window = GetWidget();
- return new BubbleFrameView(window, window->widget_delegate(), style_);
-}
-
-views::Widget* BubbleWindow::Create(
- gfx::NativeWindow parent,
- DialogStyle style,
- views::WidgetDelegate* widget_delegate) {
- views::Widget* window = new views::Widget;
- BubbleWindow* bubble_window = new BubbleWindow(window, style);
- views::Widget::InitParams params;
- params.delegate = widget_delegate;
- params.native_widget = bubble_window;
- params.parent = GTK_WIDGET(parent);
- params.bounds = gfx::Rect();
- window->Init(params);
-
- return window;
-}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/frame/bubble_window.cc ('k') | chrome/browser/chromeos/frame/bubble_window_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698