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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 9517010: Change panels to be able to turn off autoresize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix assert at the end of RenderWidget::Resize which fixes the tests on OSX. Created 8 years, 9 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 | « content/browser/tab_contents/tab_contents.h ('k') | content/common/view_messages.h » ('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 "content/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 if (delegate_) 963 if (delegate_)
964 delegate_->LostMouseLock(); 964 delegate_->LostMouseLock();
965 } 965 }
966 966
967 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) { 967 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) {
968 preferred_size_ = pref_size; 968 preferred_size_ = pref_size;
969 if (delegate_) 969 if (delegate_)
970 delegate_->UpdatePreferredSize(this, pref_size); 970 delegate_->UpdatePreferredSize(this, pref_size);
971 } 971 }
972 972
973 void TabContents::ResizeDueToAutoResize(const gfx::Size& new_size) {
974 if (delegate_)
975 delegate_->ResizeDueToAutoResize(this, new_size);
976 }
977
973 void TabContents::WebUISend(RenderViewHost* render_view_host, 978 void TabContents::WebUISend(RenderViewHost* render_view_host,
974 const GURL& source_url, 979 const GURL& source_url,
975 const std::string& name, 980 const std::string& name,
976 const base::ListValue& args) { 981 const base::ListValue& args) {
977 if (delegate_) 982 if (delegate_)
978 delegate_->WebUISend(this, source_url, name, args); 983 delegate_->WebUISend(this, source_url, name, args);
979 } 984 }
980 985
981 WebContents* TabContents::OpenURL(const OpenURLParams& params) { 986 WebContents* TabContents::OpenURL(const OpenURLParams& params) {
982 if (!delegate_) 987 if (!delegate_)
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 save_info, 2488 save_info,
2484 this); 2489 this);
2485 } 2490 }
2486 2491
2487 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2492 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2488 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2493 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2489 // Can be NULL during tests. 2494 // Can be NULL during tests.
2490 if (rwh_view) 2495 if (rwh_view)
2491 rwh_view->SetSize(GetView()->GetContainerSize()); 2496 rwh_view->SetSize(GetView()->GetContainerSize());
2492 } 2497 }
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698