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

Side by Side Diff: chrome/browser/chromeos/frame/bubble_window_gtk.cc

Issue 8469006: Promote bubble_window_style to more general dialog_style. (Closed) Base URL: /usr/local/google/home/bshe/NoTouchChromium/../TouchChromium/src/@trunk
Patch Set: Change base url and merge trunk. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/frame/bubble_window.h" 5 #include "chrome/browser/chromeos/frame/bubble_window.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/chromeos/frame/bubble_frame_view.h" 9 #include "chrome/browser/chromeos/frame/bubble_frame_view.h"
10 #include "ui/gfx/skia_utils_gtk.h" 10 #include "ui/gfx/skia_utils_gtk.h"
11 #include "ui/views/window/non_client_view.h" 11 #include "ui/views/window/non_client_view.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 BubbleWindow::BubbleWindow(views::Widget* window, 15 BubbleWindow::BubbleWindow(views::Widget* window,
16 BubbleWindowStyle style) 16 DialogStyle style)
17 : views::NativeWidgetGtk(window), 17 : views::NativeWidgetGtk(window),
18 style_(style) { 18 style_(style) {
19 } 19 }
20 20
21 void BubbleWindow::InitNativeWidget(const views::Widget::InitParams& params) { 21 void BubbleWindow::InitNativeWidget(const views::Widget::InitParams& params) {
22 views::NativeWidgetGtk::InitNativeWidget(params); 22 views::NativeWidgetGtk::InitNativeWidget(params);
23 23
24 // Turn on double buffering so that the hosted GtkWidgets does not 24 // Turn on double buffering so that the hosted GtkWidgets does not
25 // flash as in http://crosbug.com/9065. 25 // flash as in http://crosbug.com/9065.
26 EnableDoubleBuffer(true); 26 EnableDoubleBuffer(true);
(...skipping 13 matching lines...) Expand all
40 gdk_window_set_back_pixmap(window_contents()->window, NULL, FALSE); 40 gdk_window_set_back_pixmap(window_contents()->window, NULL, FALSE);
41 } 41 }
42 42
43 views::NonClientFrameView* BubbleWindow::CreateNonClientFrameView() { 43 views::NonClientFrameView* BubbleWindow::CreateNonClientFrameView() {
44 views::Widget* window = GetWidget(); 44 views::Widget* window = GetWidget();
45 return new BubbleFrameView(window, window->widget_delegate(), style_); 45 return new BubbleFrameView(window, window->widget_delegate(), style_);
46 } 46 }
47 47
48 views::Widget* BubbleWindow::Create( 48 views::Widget* BubbleWindow::Create(
49 gfx::NativeWindow parent, 49 gfx::NativeWindow parent,
50 BubbleWindowStyle style, 50 DialogStyle style,
51 views::WidgetDelegate* widget_delegate) { 51 views::WidgetDelegate* widget_delegate) {
52 views::Widget* window = new views::Widget; 52 views::Widget* window = new views::Widget;
53 BubbleWindow* bubble_window = new BubbleWindow(window, style); 53 BubbleWindow* bubble_window = new BubbleWindow(window, style);
54 views::Widget::InitParams params; 54 views::Widget::InitParams params;
55 params.delegate = widget_delegate; 55 params.delegate = widget_delegate;
56 params.native_widget = bubble_window; 56 params.native_widget = bubble_window;
57 params.parent = GTK_WIDGET(parent); 57 params.parent = GTK_WIDGET(parent);
58 params.bounds = gfx::Rect(); 58 params.bounds = gfx::Rect();
59 window->Init(params); 59 window->Init(params);
60 60
61 return window; 61 return window;
62 } 62 }
63 63
64 } // namespace chromeos 64 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/bubble_window.h ('k') | chrome/browser/chromeos/frame/bubble_window_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698