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

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

Issue 10540100: TabContentsWrapper -> TabContents, part 48. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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) 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 "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents.h"
10 #include "chrome/browser/ui/views/constrained_window_views.h" 10 #include "chrome/browser/ui/views/constrained_window_views.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
13 #include "ui/views/controls/webview/webview.h" 13 #include "ui/views/controls/webview/webview.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 #include "ui/views/widget/widget_delegate.h" 15 #include "ui/views/widget/widget_delegate.h"
16 #include "ui/web_dialogs/web_dialog_delegate.h" 16 #include "ui/web_dialogs/web_dialog_delegate.h"
17 #include "ui/web_dialogs/web_dialog_ui.h" 17 #include "ui/web_dialogs/web_dialog_ui.h"
18 18
19 using content::WebContents; 19 using content::WebContents;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 virtual void OnDialogCloseFromWebUI() OVERRIDE { 79 virtual void OnDialogCloseFromWebUI() OVERRIDE {
80 return impl_->OnDialogCloseFromWebUI(); 80 return impl_->OnDialogCloseFromWebUI();
81 } 81 }
82 virtual void ReleaseTabContentsOnDialogClose() OVERRIDE { 82 virtual void ReleaseTabContentsOnDialogClose() OVERRIDE {
83 return impl_->ReleaseTabContentsOnDialogClose(); 83 return impl_->ReleaseTabContentsOnDialogClose();
84 } 84 }
85 virtual ConstrainedWindow* window() OVERRIDE { 85 virtual ConstrainedWindow* window() OVERRIDE {
86 return impl_->window(); 86 return impl_->window();
87 } 87 }
88 virtual TabContentsWrapper* tab() OVERRIDE { 88 virtual TabContents* tab() OVERRIDE {
89 return impl_->tab(); 89 return impl_->tab();
90 } 90 }
91 91
92 // views::WidgetDelegate interface. 92 // views::WidgetDelegate interface.
93 virtual views::View* GetInitiallyFocusedView() OVERRIDE { 93 virtual views::View* GetInitiallyFocusedView() OVERRIDE {
94 return this; 94 return this;
95 } 95 }
96 virtual bool CanResize() const OVERRIDE { return true; } 96 virtual bool CanResize() const OVERRIDE { return true; }
97 virtual void WindowClosing() OVERRIDE { 97 virtual void WindowClosing() OVERRIDE {
98 if (!impl_->closed_via_webui()) 98 if (!impl_->closed_via_webui())
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 SetWebContents(tab()->web_contents()); 137 SetWebContents(tab()->web_contents());
138 } 138 }
139 139
140 ConstrainedWebDialogDelegateViewViews::~ConstrainedWebDialogDelegateViewViews() { 140 ConstrainedWebDialogDelegateViewViews::~ConstrainedWebDialogDelegateViewViews() {
141 } 141 }
142 142
143 ConstrainedWebDialogDelegate* ui::CreateConstrainedWebDialog( 143 ConstrainedWebDialogDelegate* ui::CreateConstrainedWebDialog(
144 Profile* profile, 144 Profile* profile,
145 WebDialogDelegate* delegate, 145 WebDialogDelegate* delegate,
146 WebDialogWebContentsDelegate* tab_delegate, 146 WebDialogWebContentsDelegate* tab_delegate,
147 TabContentsWrapper* container) { 147 TabContents* container) {
148 ConstrainedWebDialogDelegateViewViews* constrained_delegate = 148 ConstrainedWebDialogDelegateViewViews* constrained_delegate =
149 new ConstrainedWebDialogDelegateViewViews(profile, delegate, tab_delegate) ; 149 new ConstrainedWebDialogDelegateViewViews(profile, delegate, tab_delegate) ;
150 ConstrainedWindow* constrained_window = 150 ConstrainedWindow* constrained_window =
151 new ConstrainedWindowViews(container, constrained_delegate); 151 new ConstrainedWindowViews(container, constrained_delegate);
152 constrained_delegate->set_window(constrained_window); 152 constrained_delegate->set_window(constrained_window);
153 return constrained_delegate; 153 return constrained_delegate;
154 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/collected_cookies_views.cc ('k') | chrome/browser/ui/views/constrained_window_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698