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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 void OnDidDisplayInsecureContent(); | 699 void OnDidDisplayInsecureContent(); |
702 void OnDidRunInsecureContent(const std::string& security_origin, | 700 void OnDidRunInsecureContent(const std::string& security_origin, |
703 const GURL& target_url); | 701 const GURL& target_url); |
704 void OnDocumentLoadedInFrame(); | 702 void OnDocumentLoadedInFrame(); |
705 void OnDidFinishLoad(const GURL& url); | 703 void OnDidFinishLoad(const GURL& url); |
706 void OnDidStartLoading(bool to_different_document); | 704 void OnDidStartLoading(bool to_different_document); |
707 void OnDidStopLoading(); | 705 void OnDidStopLoading(); |
708 void OnDidChangeLoadProgress(double load_progress); | 706 void OnDidChangeLoadProgress(double load_progress); |
709 void OnGoToEntryAtOffset(int offset); | 707 void OnGoToEntryAtOffset(int offset); |
710 void OnUpdateZoomLimits(int minimum_percent, | 708 void OnUpdateZoomLimits(int minimum_percent, |
711 int maximum_percent, | 709 int maximum_percent); |
712 bool remember); | |
713 void OnEnumerateDirectory(int request_id, const base::FilePath& path); | 710 void OnEnumerateDirectory(int request_id, const base::FilePath& path); |
714 | 711 |
715 void OnRegisterProtocolHandler(const std::string& protocol, | 712 void OnRegisterProtocolHandler(const std::string& protocol, |
716 const GURL& url, | 713 const GURL& url, |
717 const base::string16& title, | 714 const base::string16& title, |
718 bool user_gesture); | 715 bool user_gesture); |
719 void OnFindReply(int request_id, | 716 void OnFindReply(int request_id, |
720 int number_of_matches, | 717 int number_of_matches, |
721 const gfx::Rect& selection_rect, | 718 const gfx::Rect& selection_rect, |
722 int active_match_ordinal, | 719 int active_match_ordinal, |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 // The time that this WebContents was last made active. The initial value is | 1036 // The time that this WebContents was last made active. The initial value is |
1040 // the WebContents creation time. | 1037 // the WebContents creation time. |
1041 base::TimeTicks last_active_time_; | 1038 base::TimeTicks last_active_time_; |
1042 | 1039 |
1043 // See description above setter. | 1040 // See description above setter. |
1044 bool closed_by_user_gesture_; | 1041 bool closed_by_user_gesture_; |
1045 | 1042 |
1046 // Minimum/maximum zoom percent. | 1043 // Minimum/maximum zoom percent. |
1047 int minimum_zoom_percent_; | 1044 int minimum_zoom_percent_; |
1048 int maximum_zoom_percent_; | 1045 int maximum_zoom_percent_; |
1049 // If true, the default zoom limits have been overriden for this tab, in which | |
1050 // case we don't want saved settings to apply to it and we don't want to | |
1051 // remember it. | |
1052 bool temporary_zoom_settings_; | |
1053 | 1046 |
1054 // The raw accumulated zoom value and the actual zoom increments made for an | 1047 // The raw accumulated zoom value and the actual zoom increments made for an |
1055 // an in-progress pinch gesture. | 1048 // an in-progress pinch gesture. |
1056 float totalPinchGestureAmount_; | 1049 float totalPinchGestureAmount_; |
1057 int currentPinchZoomStepDelta_; | 1050 int currentPinchZoomStepDelta_; |
1058 | 1051 |
1059 // The intrinsic size of the page. | 1052 // The intrinsic size of the page. |
1060 gfx::Size preferred_size_; | 1053 gfx::Size preferred_size_; |
1061 | 1054 |
1062 // The preferred size for content screen capture. When |capturer_count_| > 0, | 1055 // The preferred size for content screen capture. When |capturer_count_| > 0, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 bool last_dialog_suppressed_; | 1124 bool last_dialog_suppressed_; |
1132 | 1125 |
1133 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_; | 1126 scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_; |
1134 | 1127 |
1135 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1128 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1136 }; | 1129 }; |
1137 | 1130 |
1138 } // namespace content | 1131 } // namespace content |
1139 | 1132 |
1140 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1133 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |