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

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

Issue 10795078: Fixes two bugs related to constrained windows: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.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"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 DCHECK_EQ(ui::VKEY_ESCAPE, accelerator.key_code()); 136 DCHECK_EQ(ui::VKEY_ESCAPE, accelerator.key_code());
137 window()->CloseConstrainedWindow(); 137 window()->CloseConstrainedWindow();
138 return true; 138 return true;
139 } 139 }
140 virtual gfx::Size GetPreferredSize() OVERRIDE { 140 virtual gfx::Size GetPreferredSize() OVERRIDE {
141 gfx::Size size; 141 gfx::Size size;
142 if (!impl_->closed_via_webui()) 142 if (!impl_->closed_via_webui())
143 GetWebDialogDelegate()->GetDialogSize(&size); 143 GetWebDialogDelegate()->GetDialogSize(&size);
144 return size; 144 return size;
145 } 145 }
146 virtual gfx::Size GetMinimumSize() OVERRIDE {
147 // Return an empty size so that we can be made smaller.
148 return gfx::Size();
149 }
146 150
147 private: 151 private:
148 scoped_ptr<ConstrainedWebDialogDelegateViews> impl_; 152 scoped_ptr<ConstrainedWebDialogDelegateViews> impl_;
149 153
150 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateViewViews); 154 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateViewViews);
151 }; 155 };
152 156
153 ConstrainedWebDialogDelegateViewViews::ConstrainedWebDialogDelegateViewViews( 157 ConstrainedWebDialogDelegateViewViews::ConstrainedWebDialogDelegateViewViews(
154 Profile* profile, 158 Profile* profile,
155 WebDialogDelegate* delegate, 159 WebDialogDelegate* delegate,
(...skipping 18 matching lines...) Expand all
174 WebDialogDelegate* delegate, 178 WebDialogDelegate* delegate,
175 WebDialogWebContentsDelegate* tab_delegate, 179 WebDialogWebContentsDelegate* tab_delegate,
176 TabContents* container) { 180 TabContents* container) {
177 ConstrainedWebDialogDelegateViewViews* constrained_delegate = 181 ConstrainedWebDialogDelegateViewViews* constrained_delegate =
178 new ConstrainedWebDialogDelegateViewViews(profile, delegate, tab_delegate) ; 182 new ConstrainedWebDialogDelegateViewViews(profile, delegate, tab_delegate) ;
179 ConstrainedWindow* constrained_window = 183 ConstrainedWindow* constrained_window =
180 new ConstrainedWindowViews(container, constrained_delegate); 184 new ConstrainedWindowViews(container, constrained_delegate);
181 constrained_delegate->set_window(constrained_window); 185 constrained_delegate->set_window(constrained_window);
182 return constrained_delegate; 186 return constrained_delegate;
183 } 187 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698