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

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

Issue 9215002: Fix window zoom in a sane way, remove nasty casts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 8 years, 11 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/public/browser/web_contents.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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 GotResponseToLockMouseRequest(false); 757 GotResponseToLockMouseRequest(false);
758 } 758 }
759 } 759 }
760 760
761 void TabContents::LostMouseLock() { 761 void TabContents::LostMouseLock() {
762 if (delegate_) 762 if (delegate_)
763 delegate_->LostMouseLock(); 763 delegate_->LostMouseLock();
764 } 764 }
765 765
766 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) { 766 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) {
767 preferred_size_ = pref_size;
767 if (delegate_) 768 if (delegate_)
768 delegate_->UpdatePreferredSize(this, pref_size); 769 delegate_->UpdatePreferredSize(this, pref_size);
769 } 770 }
770 771
771 void TabContents::WebUISend(RenderViewHost* render_view_host, 772 void TabContents::WebUISend(RenderViewHost* render_view_host,
772 const GURL& source_url, 773 const GURL& source_url,
773 const std::string& name, 774 const std::string& name,
774 const base::ListValue& args) { 775 const base::ListValue& args) {
775 if (delegate_) 776 if (delegate_)
776 delegate_->WebUISend(this, source_url, name, args); 777 delegate_->WebUISend(this, source_url, name, args);
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } 1053 }
1053 1054
1054 int TabContents::GetMinimumZoomPercent() const { 1055 int TabContents::GetMinimumZoomPercent() const {
1055 return minimum_zoom_percent_; 1056 return minimum_zoom_percent_;
1056 } 1057 }
1057 1058
1058 int TabContents::GetMaximumZoomPercent() const { 1059 int TabContents::GetMaximumZoomPercent() const {
1059 return maximum_zoom_percent_; 1060 return maximum_zoom_percent_;
1060 } 1061 }
1061 1062
1063 gfx::Size TabContents::GetPreferredSize() const {
1064 return preferred_size_;
1065 }
1066
1062 int TabContents::GetContentRestrictions() const { 1067 int TabContents::GetContentRestrictions() const {
1063 return content_restrictions_; 1068 return content_restrictions_;
1064 } 1069 }
1065 1070
1066 WebUI::TypeID TabContents::GetWebUITypeForCurrentState() { 1071 WebUI::TypeID TabContents::GetWebUITypeForCurrentState() {
1067 return content::GetContentClient()->browser()->GetWebUIFactory()-> 1072 return content::GetContentClient()->browser()->GetWebUIFactory()->
1068 GetWebUIType(GetBrowserContext(), GetURL()); 1073 GetWebUIType(GetBrowserContext(), GetURL());
1069 } 1074 }
1070 1075
1071 WebUI* TabContents::GetWebUIForCurrentState() { 1076 WebUI* TabContents::GetWebUIForCurrentState() {
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 encoding_ = content::GetContentClient()->browser()-> 2242 encoding_ = content::GetContentClient()->browser()->
2238 GetCanonicalEncodingNameByAliasName(encoding); 2243 GetCanonicalEncodingNameByAliasName(encoding);
2239 } 2244 }
2240 2245
2241 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2246 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2242 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2247 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2243 // Can be NULL during tests. 2248 // Can be NULL during tests.
2244 if (rwh_view) 2249 if (rwh_view)
2245 rwh_view->SetSize(GetView()->GetContainerSize()); 2250 rwh_view->SetSize(GetView()->GetContainerSize());
2246 } 2251 }
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698