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

Side by Side Diff: apps/ui/views/native_app_window_views.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 | « apps/ui/views/native_app_window_views.h ('k') | ash/accelerators/exit_warning_handler.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "apps/ui/views/native_app_window_views.h" 5 #include "apps/ui/views/native_app_window_views.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "content/public/browser/render_view_host.h" 9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/render_widget_host_view.h" 10 #include "content/public/browser/render_widget_host_view.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 void NativeAppWindowViews::ViewHierarchyChanged( 285 void NativeAppWindowViews::ViewHierarchyChanged(
286 const ViewHierarchyChangedDetails& details) { 286 const ViewHierarchyChangedDetails& details) {
287 if (details.is_add && details.child == this) { 287 if (details.is_add && details.child == this) {
288 web_view_ = new views::WebView(NULL); 288 web_view_ = new views::WebView(NULL);
289 AddChildView(web_view_); 289 AddChildView(web_view_);
290 web_view_->SetWebContents(app_window_->web_contents()); 290 web_view_->SetWebContents(app_window_->web_contents());
291 } 291 }
292 } 292 }
293 293
294 gfx::Size NativeAppWindowViews::GetMinimumSize() { 294 gfx::Size NativeAppWindowViews::GetMinimumSize() const {
295 return size_constraints_.GetMinimumSize(); 295 return size_constraints_.GetMinimumSize();
296 } 296 }
297 297
298 gfx::Size NativeAppWindowViews::GetMaximumSize() { 298 gfx::Size NativeAppWindowViews::GetMaximumSize() {
299 return size_constraints_.GetMaximumSize(); 299 return size_constraints_.GetMaximumSize();
300 } 300 }
301 301
302 void NativeAppWindowViews::OnFocus() { 302 void NativeAppWindowViews::OnFocus() {
303 web_view_->RequestFocus(); 303 web_view_->RequestFocus();
304 } 304 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 return size_constraints_.GetMaximumSize(); 393 return size_constraints_.GetMaximumSize();
394 } 394 }
395 395
396 void NativeAppWindowViews::SetContentSizeConstraints( 396 void NativeAppWindowViews::SetContentSizeConstraints(
397 const gfx::Size& min_size, const gfx::Size& max_size) { 397 const gfx::Size& min_size, const gfx::Size& max_size) {
398 size_constraints_.set_minimum_size(min_size); 398 size_constraints_.set_minimum_size(min_size);
399 size_constraints_.set_maximum_size(max_size); 399 size_constraints_.set_maximum_size(max_size);
400 } 400 }
401 401
402 } // namespace apps 402 } // namespace apps
OLDNEW
« no previous file with comments | « apps/ui/views/native_app_window_views.h ('k') | ash/accelerators/exit_warning_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698