OLD | NEW |
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 virtual const std::string& GetContentsMimeType() const OVERRIDE; | 273 virtual const std::string& GetContentsMimeType() const OVERRIDE; |
274 virtual bool WillNotifyDisconnection() const OVERRIDE; | 274 virtual bool WillNotifyDisconnection() const OVERRIDE; |
275 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; | 275 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; |
276 virtual void ResetOverrideEncoding() OVERRIDE; | 276 virtual void ResetOverrideEncoding() OVERRIDE; |
277 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; | 277 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; |
278 virtual void Close() OVERRIDE; | 278 virtual void Close() OVERRIDE; |
279 virtual void SystemDragEnded() OVERRIDE; | 279 virtual void SystemDragEnded() OVERRIDE; |
280 virtual void UserGestureDone() OVERRIDE; | 280 virtual void UserGestureDone() OVERRIDE; |
281 virtual void SetClosedByUserGesture(bool value) OVERRIDE; | 281 virtual void SetClosedByUserGesture(bool value) OVERRIDE; |
282 virtual bool GetClosedByUserGesture() const OVERRIDE; | 282 virtual bool GetClosedByUserGesture() const OVERRIDE; |
283 virtual double GetZoomLevel() const OVERRIDE; | |
284 virtual int GetZoomPercent(bool* enable_increment, | 283 virtual int GetZoomPercent(bool* enable_increment, |
285 bool* enable_decrement) const OVERRIDE; | 284 bool* enable_decrement) const OVERRIDE; |
286 virtual void ViewSource() OVERRIDE; | 285 virtual void ViewSource() OVERRIDE; |
287 virtual void ViewFrameSource(const GURL& url, | 286 virtual void ViewFrameSource(const GURL& url, |
288 const PageState& page_state) OVERRIDE; | 287 const PageState& page_state) OVERRIDE; |
289 virtual int GetMinimumZoomPercent() const OVERRIDE; | 288 virtual int GetMinimumZoomPercent() const OVERRIDE; |
290 virtual int GetMaximumZoomPercent() const OVERRIDE; | 289 virtual int GetMaximumZoomPercent() const OVERRIDE; |
291 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 290 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
292 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 291 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
293 virtual bool HasOpener() const OVERRIDE; | 292 virtual bool HasOpener() const OVERRIDE; |
294 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE; | 293 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE; |
295 virtual void DidEndColorChooser() OVERRIDE; | 294 virtual void DidEndColorChooser() OVERRIDE; |
296 virtual int DownloadImage(const GURL& url, | 295 virtual int DownloadImage(const GURL& url, |
297 bool is_favicon, | 296 bool is_favicon, |
298 uint32_t max_bitmap_size, | 297 uint32_t max_bitmap_size, |
299 const ImageDownloadCallback& callback) OVERRIDE; | 298 const ImageDownloadCallback& callback) OVERRIDE; |
300 virtual bool IsSubframe() const OVERRIDE; | 299 virtual bool IsSubframe() const OVERRIDE; |
301 virtual void Find(int request_id, | 300 virtual void Find(int request_id, |
302 const base::string16& search_text, | 301 const base::string16& search_text, |
303 const blink::WebFindOptions& options) OVERRIDE; | 302 const blink::WebFindOptions& options) OVERRIDE; |
304 virtual void SetZoomLevel(double level) OVERRIDE; | |
305 virtual void StopFinding(StopFindAction action) OVERRIDE; | 303 virtual void StopFinding(StopFindAction action) OVERRIDE; |
306 virtual void InsertCSS(const std::string& css) OVERRIDE; | 304 virtual void InsertCSS(const std::string& css) OVERRIDE; |
307 #if defined(OS_ANDROID) | 305 #if defined(OS_ANDROID) |
308 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() | 306 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() |
309 OVERRIDE; | 307 OVERRIDE; |
310 #elif defined(OS_MACOSX) | 308 #elif defined(OS_MACOSX) |
311 virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE; | 309 virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE; |
312 virtual bool GetAllowOverlappingViews() OVERRIDE; | 310 virtual bool GetAllowOverlappingViews() OVERRIDE; |
313 virtual void SetOverlayView(WebContents* overlay, | 311 virtual void SetOverlayView(WebContents* overlay, |
314 const gfx::Point& offset) OVERRIDE; | 312 const gfx::Point& offset) OVERRIDE; |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 void OnDidDisplayInsecureContent(); | 704 void OnDidDisplayInsecureContent(); |
707 void OnDidRunInsecureContent(const std::string& security_origin, | 705 void OnDidRunInsecureContent(const std::string& security_origin, |
708 const GURL& target_url); | 706 const GURL& target_url); |
709 void OnDocumentLoadedInFrame(); | 707 void OnDocumentLoadedInFrame(); |
710 void OnDidFinishLoad(const GURL& url); | 708 void OnDidFinishLoad(const GURL& url); |
711 void OnDidStartLoading(bool to_different_document); | 709 void OnDidStartLoading(bool to_different_document); |
712 void OnDidStopLoading(); | 710 void OnDidStopLoading(); |
713 void OnDidChangeLoadProgress(double load_progress); | 711 void OnDidChangeLoadProgress(double load_progress); |
714 void OnGoToEntryAtOffset(int offset); | 712 void OnGoToEntryAtOffset(int offset); |
715 void OnUpdateZoomLimits(int minimum_percent, | 713 void OnUpdateZoomLimits(int minimum_percent, |
716 int maximum_percent, | 714 int maximum_percent); |
717 bool remember); | |
718 void OnEnumerateDirectory(int request_id, const base::FilePath& path); | 715 void OnEnumerateDirectory(int request_id, const base::FilePath& path); |
719 | 716 |
720 void OnRegisterProtocolHandler(const std::string& protocol, | 717 void OnRegisterProtocolHandler(const std::string& protocol, |
721 const GURL& url, | 718 const GURL& url, |
722 const base::string16& title, | 719 const base::string16& title, |
723 bool user_gesture); | 720 bool user_gesture); |
724 void OnFindReply(int request_id, | 721 void OnFindReply(int request_id, |
725 int number_of_matches, | 722 int number_of_matches, |
726 const gfx::Rect& selection_rect, | 723 const gfx::Rect& selection_rect, |
727 int active_match_ordinal, | 724 int active_match_ordinal, |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 // The time that this WebContents was last made active. The initial value is | 1040 // The time that this WebContents was last made active. The initial value is |
1044 // the WebContents creation time. | 1041 // the WebContents creation time. |
1045 base::TimeTicks last_active_time_; | 1042 base::TimeTicks last_active_time_; |
1046 | 1043 |
1047 // See description above setter. | 1044 // See description above setter. |
1048 bool closed_by_user_gesture_; | 1045 bool closed_by_user_gesture_; |
1049 | 1046 |
1050 // Minimum/maximum zoom percent. | 1047 // Minimum/maximum zoom percent. |
1051 int minimum_zoom_percent_; | 1048 int minimum_zoom_percent_; |
1052 int maximum_zoom_percent_; | 1049 int maximum_zoom_percent_; |
1053 // If true, the default zoom limits have been overriden for this tab, in which | |
1054 // case we don't want saved settings to apply to it and we don't want to | |
1055 // remember it. | |
1056 bool temporary_zoom_settings_; | |
1057 | 1050 |
1058 // The raw accumulated zoom value and the actual zoom increments made for an | 1051 // The raw accumulated zoom value and the actual zoom increments made for an |
1059 // an in-progress pinch gesture. | 1052 // an in-progress pinch gesture. |
1060 float totalPinchGestureAmount_; | 1053 float totalPinchGestureAmount_; |
1061 int currentPinchZoomStepDelta_; | 1054 int currentPinchZoomStepDelta_; |
1062 | 1055 |
1063 // The intrinsic size of the page. | 1056 // The intrinsic size of the page. |
1064 gfx::Size preferred_size_; | 1057 gfx::Size preferred_size_; |
1065 | 1058 |
1066 // The preferred size for content screen capture. When |capturer_count_| > 0, | 1059 // The preferred size for content screen capture. When |capturer_count_| > 0, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 bool last_dialog_suppressed_; | 1128 bool last_dialog_suppressed_; |
1136 | 1129 |
1137 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_; | 1130 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_; |
1138 | 1131 |
1139 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1132 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1140 }; | 1133 }; |
1141 | 1134 |
1142 } // namespace content | 1135 } // namespace content |
1143 | 1136 |
1144 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1137 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |