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

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 287093002: Remove ViewMsg_SetZoomLevel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-order functions, add comments and DCHECK(). 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
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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 virtual const std::string& GetContentsMimeType() const OVERRIDE; 271 virtual const std::string& GetContentsMimeType() const OVERRIDE;
272 virtual bool WillNotifyDisconnection() const OVERRIDE; 272 virtual bool WillNotifyDisconnection() const OVERRIDE;
273 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; 273 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE;
274 virtual void ResetOverrideEncoding() OVERRIDE; 274 virtual void ResetOverrideEncoding() OVERRIDE;
275 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; 275 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE;
276 virtual void Close() OVERRIDE; 276 virtual void Close() OVERRIDE;
277 virtual void SystemDragEnded() OVERRIDE; 277 virtual void SystemDragEnded() OVERRIDE;
278 virtual void UserGestureDone() OVERRIDE; 278 virtual void UserGestureDone() OVERRIDE;
279 virtual void SetClosedByUserGesture(bool value) OVERRIDE; 279 virtual void SetClosedByUserGesture(bool value) OVERRIDE;
280 virtual bool GetClosedByUserGesture() const OVERRIDE; 280 virtual bool GetClosedByUserGesture() const OVERRIDE;
281 virtual double GetZoomLevel() const OVERRIDE;
282 virtual int GetZoomPercent(bool* enable_increment, 281 virtual int GetZoomPercent(bool* enable_increment,
283 bool* enable_decrement) const OVERRIDE; 282 bool* enable_decrement) const OVERRIDE;
284 virtual void ViewSource() OVERRIDE; 283 virtual void ViewSource() OVERRIDE;
285 virtual void ViewFrameSource(const GURL& url, 284 virtual void ViewFrameSource(const GURL& url,
286 const PageState& page_state) OVERRIDE; 285 const PageState& page_state) OVERRIDE;
287 virtual int GetMinimumZoomPercent() const OVERRIDE; 286 virtual int GetMinimumZoomPercent() const OVERRIDE;
288 virtual int GetMaximumZoomPercent() const OVERRIDE; 287 virtual int GetMaximumZoomPercent() const OVERRIDE;
289 virtual gfx::Size GetPreferredSize() const OVERRIDE; 288 virtual gfx::Size GetPreferredSize() const OVERRIDE;
290 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; 289 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE;
291 virtual bool HasOpener() const OVERRIDE; 290 virtual bool HasOpener() const OVERRIDE;
292 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE; 291 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE;
293 virtual void DidEndColorChooser() OVERRIDE; 292 virtual void DidEndColorChooser() OVERRIDE;
294 virtual int DownloadImage(const GURL& url, 293 virtual int DownloadImage(const GURL& url,
295 bool is_favicon, 294 bool is_favicon,
296 uint32_t max_bitmap_size, 295 uint32_t max_bitmap_size,
297 const ImageDownloadCallback& callback) OVERRIDE; 296 const ImageDownloadCallback& callback) OVERRIDE;
298 virtual bool IsSubframe() const OVERRIDE; 297 virtual bool IsSubframe() const OVERRIDE;
299 virtual void Find(int request_id, 298 virtual void Find(int request_id,
300 const base::string16& search_text, 299 const base::string16& search_text,
301 const blink::WebFindOptions& options) OVERRIDE; 300 const blink::WebFindOptions& options) OVERRIDE;
302 virtual void SetZoomLevel(double level) OVERRIDE;
303 virtual void StopFinding(StopFindAction action) OVERRIDE; 301 virtual void StopFinding(StopFindAction action) OVERRIDE;
304 virtual void InsertCSS(const std::string& css) OVERRIDE; 302 virtual void InsertCSS(const std::string& css) OVERRIDE;
305 #if defined(OS_ANDROID) 303 #if defined(OS_ANDROID)
306 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() 304 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents()
307 OVERRIDE; 305 OVERRIDE;
308 #elif defined(OS_MACOSX) 306 #elif defined(OS_MACOSX)
309 virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE; 307 virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE;
310 virtual bool GetAllowOverlappingViews() OVERRIDE; 308 virtual bool GetAllowOverlappingViews() OVERRIDE;
311 virtual void SetOverlayView(WebContents* overlay, 309 virtual void SetOverlayView(WebContents* overlay,
312 const gfx::Point& offset) OVERRIDE; 310 const gfx::Point& offset) OVERRIDE;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 void OnDidDisplayInsecureContent(); 697 void OnDidDisplayInsecureContent();
700 void OnDidRunInsecureContent(const std::string& security_origin, 698 void OnDidRunInsecureContent(const std::string& security_origin,
701 const GURL& target_url); 699 const GURL& target_url);
702 void OnDocumentLoadedInFrame(); 700 void OnDocumentLoadedInFrame();
703 void OnDidFinishLoad(const GURL& url); 701 void OnDidFinishLoad(const GURL& url);
704 void OnDidStartLoading(bool to_different_document); 702 void OnDidStartLoading(bool to_different_document);
705 void OnDidStopLoading(); 703 void OnDidStopLoading();
706 void OnDidChangeLoadProgress(double load_progress); 704 void OnDidChangeLoadProgress(double load_progress);
707 void OnGoToEntryAtOffset(int offset); 705 void OnGoToEntryAtOffset(int offset);
708 void OnUpdateZoomLimits(int minimum_percent, 706 void OnUpdateZoomLimits(int minimum_percent,
709 int maximum_percent, 707 int maximum_percent);
710 bool remember);
711 void OnEnumerateDirectory(int request_id, const base::FilePath& path); 708 void OnEnumerateDirectory(int request_id, const base::FilePath& path);
712 709
713 void OnRegisterProtocolHandler(const std::string& protocol, 710 void OnRegisterProtocolHandler(const std::string& protocol,
714 const GURL& url, 711 const GURL& url,
715 const base::string16& title, 712 const base::string16& title,
716 bool user_gesture); 713 bool user_gesture);
717 void OnFindReply(int request_id, 714 void OnFindReply(int request_id,
718 int number_of_matches, 715 int number_of_matches,
719 const gfx::Rect& selection_rect, 716 const gfx::Rect& selection_rect,
720 int active_match_ordinal, 717 int active_match_ordinal,
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 // The time that this WebContents was last made active. The initial value is 1034 // The time that this WebContents was last made active. The initial value is
1038 // the WebContents creation time. 1035 // the WebContents creation time.
1039 base::TimeTicks last_active_time_; 1036 base::TimeTicks last_active_time_;
1040 1037
1041 // See description above setter. 1038 // See description above setter.
1042 bool closed_by_user_gesture_; 1039 bool closed_by_user_gesture_;
1043 1040
1044 // Minimum/maximum zoom percent. 1041 // Minimum/maximum zoom percent.
1045 int minimum_zoom_percent_; 1042 int minimum_zoom_percent_;
1046 int maximum_zoom_percent_; 1043 int maximum_zoom_percent_;
1047 // If true, the default zoom limits have been overriden for this tab, in which
1048 // case we don't want saved settings to apply to it and we don't want to
1049 // remember it.
1050 bool temporary_zoom_settings_;
1051 1044
1052 // The raw accumulated zoom value and the actual zoom increments made for an 1045 // The raw accumulated zoom value and the actual zoom increments made for an
1053 // an in-progress pinch gesture. 1046 // an in-progress pinch gesture.
1054 float totalPinchGestureAmount_; 1047 float totalPinchGestureAmount_;
1055 int currentPinchZoomStepDelta_; 1048 int currentPinchZoomStepDelta_;
1056 1049
1057 // The intrinsic size of the page. 1050 // The intrinsic size of the page.
1058 gfx::Size preferred_size_; 1051 gfx::Size preferred_size_;
1059 1052
1060 // The preferred size for content screen capture. When |capturer_count_| > 0, 1053 // The preferred size for content screen capture. When |capturer_count_| > 0,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 bool last_dialog_suppressed_; 1122 bool last_dialog_suppressed_;
1130 1123
1131 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_; 1124 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_;
1132 1125
1133 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1126 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1134 }; 1127 };
1135 1128
1136 } // namespace content 1129 } // namespace content
1137 1130
1138 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1131 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698