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

Side by Side Diff: chrome/browser/ui/views/constrained_html_delegate_gtk.cc

Issue 7860008: content: Move constrained html windows to TabContentsWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: views fix Created 9 years, 3 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 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/ui/webui/constrained_html_ui.h" 5 #include "chrome/browser/ui/webui/constrained_html_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 8 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
9 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" 10 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
10 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" 11 #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
11 #include "chrome/browser/ui/webui/html_dialog_ui.h" 12 #include "chrome/browser/ui/webui/html_dialog_ui.h"
12 #include "content/browser/tab_contents/tab_contents.h" 13 #include "content/browser/tab_contents/tab_contents.h"
13 #include "ui/base/gtk/gtk_hig_constants.h" 14 #include "ui/base/gtk/gtk_hig_constants.h"
14 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
15 #include "views/widget/native_widget_gtk.h" 16 #include "views/widget/native_widget_gtk.h"
16 17
17 // ConstrainedHtmlDelegateGtk works with ConstrainedWindowGtk to present 18 // ConstrainedHtmlDelegateGtk works with ConstrainedWindowGtk to present
18 // a TabContents in a ContraintedHtmlUI. 19 // a TabContents in a ContraintedHtmlUI.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 void ConstrainedHtmlDelegateGtk::OnDialogCloseFromWebUI() { 116 void ConstrainedHtmlDelegateGtk::OnDialogCloseFromWebUI() {
116 closed_via_webui_ = true; 117 closed_via_webui_ = true;
117 window_->CloseConstrainedWindow(); 118 window_->CloseConstrainedWindow();
118 } 119 }
119 120
120 // static 121 // static
121 ConstrainedWindow* ConstrainedHtmlUI::CreateConstrainedHtmlDialog( 122 ConstrainedWindow* ConstrainedHtmlUI::CreateConstrainedHtmlDialog(
122 Profile* profile, 123 Profile* profile,
123 HtmlDialogUIDelegate* delegate, 124 HtmlDialogUIDelegate* delegate,
124 TabContents* container) { 125 TabContentsWrapper* wrapper) {
125 ConstrainedHtmlDelegateGtk* constrained_delegate = 126 ConstrainedHtmlDelegateGtk* constrained_delegate =
126 new ConstrainedHtmlDelegateGtk(profile, delegate); 127 new ConstrainedHtmlDelegateGtk(profile, delegate);
127 ConstrainedWindow* constrained_window = 128 ConstrainedWindow* constrained_window =
128 new ConstrainedWindowGtk(container, constrained_delegate); 129 new ConstrainedWindowGtk(wrapper->tab_contents(), constrained_delegate);
129 constrained_delegate->set_window(constrained_window); 130 constrained_delegate->set_window(constrained_window);
130 return constrained_window; 131 return constrained_window;
131 } 132 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_prompt_ui.cc ('k') | chrome/browser/ui/views/constrained_html_delegate_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698