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

Side by Side Diff: chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc

Issue 11358027: Move constrained web dialog code back to chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros fix2 Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/constrained_web_dialog_delegate_base.h" 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h"
6 6
7 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 7 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
8 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" 8 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents.h"
10 #include "content/public/browser/notification_source.h" 10 #include "content/public/browser/notification_source.h"
11 #include "content/public/browser/render_view_host.h" 11 #include "content/public/browser/render_view_host.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "ui/base/gtk/gtk_hig_constants.h" 13 #include "ui/base/gtk/gtk_hig_constants.h"
14 #include "ui/gfx/size.h" 14 #include "ui/gfx/size.h"
15 #include "ui/web_dialogs/web_dialog_delegate.h" 15 #include "ui/web_dialogs/web_dialog_delegate.h"
16 #include "ui/web_dialogs/web_dialog_ui.h" 16 #include "ui/web_dialogs/web_dialog_ui.h"
17 17
18 using content::WebContents; 18 using content::WebContents;
19 using ui::ConstrainedWebDialogDelegate;
20 using ui::ConstrainedWebDialogUI;
21 using ui::WebDialogDelegate; 19 using ui::WebDialogDelegate;
22 using ui::WebDialogWebContentsDelegate; 20 using ui::WebDialogWebContentsDelegate;
23 21
24 class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate, 22 class ConstrainedWebDialogDelegateGtk : public ConstrainedWindowGtkDelegate,
25 public ConstrainedWebDialogDelegate { 23 public ConstrainedWebDialogDelegate {
26 public: 24 public:
27 ConstrainedWebDialogDelegateGtk( 25 ConstrainedWebDialogDelegateGtk(
28 Profile* profile, 26 Profile* profile,
29 WebDialogDelegate* delegate, 27 WebDialogDelegate* delegate,
30 WebDialogWebContentsDelegate* tab_delegate); 28 WebDialogWebContentsDelegate* tab_delegate);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 89
92 gfx::Size dialog_size; 90 gfx::Size dialog_size;
93 delegate->GetDialogSize(&dialog_size); 91 delegate->GetDialogSize(&dialog_size);
94 gtk_widget_set_size_request(GTK_WIDGET(tab_contents_container_.widget()), 92 gtk_widget_set_size_request(GTK_WIDGET(tab_contents_container_.widget()),
95 dialog_size.width(), 93 dialog_size.width(),
96 dialog_size.height()); 94 dialog_size.height());
97 95
98 gtk_widget_show_all(GetWidgetRoot()); 96 gtk_widget_show_all(GetWidgetRoot());
99 } 97 }
100 98
101 ConstrainedWebDialogDelegate* ui::CreateConstrainedWebDialog( 99 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog(
102 Profile* profile, 100 Profile* profile,
103 WebDialogDelegate* delegate, 101 WebDialogDelegate* delegate,
104 WebDialogWebContentsDelegate* tab_delegate, 102 WebDialogWebContentsDelegate* tab_delegate,
105 TabContents* overshadowed) { 103 content::WebContents* web_contents) {
106 ConstrainedWebDialogDelegateGtk* constrained_delegate = 104 ConstrainedWebDialogDelegateGtk* constrained_delegate =
107 new ConstrainedWebDialogDelegateGtk(profile, delegate, tab_delegate); 105 new ConstrainedWebDialogDelegateGtk(profile, delegate, tab_delegate);
108 ConstrainedWindow* constrained_window = new ConstrainedWindowGtk( 106 ConstrainedWindow* constrained_window =
109 overshadowed->web_contents(), constrained_delegate); 107 new ConstrainedWindowGtk(web_contents, constrained_delegate);
110 constrained_delegate->set_window(constrained_window); 108 constrained_delegate->set_window(constrained_window);
111 return constrained_delegate; 109 return constrained_delegate;
112 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698