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

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

Issue 8811001: Oust BubbleWindow from ExtensionDialog, use chromeos::BubbleFrameView directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build requisite and non-breaking chrome/browser/chromeos/frame/ files in aura cros. 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 unified diff | Download patch | Annotate | Revision Log
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"
(...skipping 23 matching lines...) Expand all
34 // manager should only show the window after getting notified. And we 34 // manager should only show the window after getting notified. And we
35 // should only notify window manager after at least one paint is done. 35 // should only notify window manager after at least one paint is done.
36 // TODO(xiyuan): Figure out the right fix. 36 // TODO(xiyuan): Figure out the right fix.
37 gtk_widget_realize(GetNativeView()); 37 gtk_widget_realize(GetNativeView());
38 gdk_window_set_back_pixmap(GetNativeView()->window, NULL, FALSE); 38 gdk_window_set_back_pixmap(GetNativeView()->window, NULL, FALSE);
39 gtk_widget_realize(window_contents()); 39 gtk_widget_realize(window_contents());
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 return new BubbleFrameView(GetWidget()->widget_delegate(), style_);
45 return new BubbleFrameView(window, window->widget_delegate(), style_);
46 } 45 }
47 46
48 views::Widget* BubbleWindow::Create( 47 views::Widget* BubbleWindow::Create(
49 gfx::NativeWindow parent, 48 gfx::NativeWindow parent,
50 DialogStyle style, 49 DialogStyle style,
51 views::WidgetDelegate* widget_delegate) { 50 views::WidgetDelegate* widget_delegate) {
52 views::Widget* window = new views::Widget; 51 views::Widget* window = new views::Widget;
53 BubbleWindow* bubble_window = new BubbleWindow(window, style); 52 BubbleWindow* bubble_window = new BubbleWindow(window, style);
54 views::Widget::InitParams params; 53 views::Widget::InitParams params;
55 params.delegate = widget_delegate; 54 params.delegate = widget_delegate;
56 params.native_widget = bubble_window; 55 params.native_widget = bubble_window;
57 params.parent = GTK_WIDGET(parent); 56 params.parent = GTK_WIDGET(parent);
58 params.bounds = gfx::Rect(); 57 params.bounds = gfx::Rect();
59 window->Init(params); 58 window->Init(params);
60 59
61 return window; 60 return window;
62 } 61 }
63 62
64 } // namespace chromeos 63 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/bubble_frame_view.cc ('k') | chrome/browser/ui/views/extensions/extension_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698