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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 virtual const std::string& GetContentsMimeType() const OVERRIDE; | 259 virtual const std::string& GetContentsMimeType() const OVERRIDE; |
260 virtual bool WillNotifyDisconnection() const OVERRIDE; | 260 virtual bool WillNotifyDisconnection() const OVERRIDE; |
261 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; | 261 virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; |
262 virtual void ResetOverrideEncoding() OVERRIDE; | 262 virtual void ResetOverrideEncoding() OVERRIDE; |
263 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; | 263 virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; |
264 virtual void Close() OVERRIDE; | 264 virtual void Close() OVERRIDE; |
265 virtual void SystemDragEnded() OVERRIDE; | 265 virtual void SystemDragEnded() OVERRIDE; |
266 virtual void UserGestureDone() OVERRIDE; | 266 virtual void UserGestureDone() OVERRIDE; |
267 virtual void SetClosedByUserGesture(bool value) OVERRIDE; | 267 virtual void SetClosedByUserGesture(bool value) OVERRIDE; |
268 virtual bool GetClosedByUserGesture() const OVERRIDE; | 268 virtual bool GetClosedByUserGesture() const OVERRIDE; |
| 269 virtual ZoomMode GetZoomMode() const OVERRIDE; |
269 virtual double GetZoomLevel() const OVERRIDE; | 270 virtual double GetZoomLevel() const OVERRIDE; |
270 virtual int GetZoomPercent(bool* enable_increment, | 271 virtual int GetZoomPercent(bool* enable_increment, |
271 bool* enable_decrement) const OVERRIDE; | 272 bool* enable_decrement) const OVERRIDE; |
272 virtual void ViewSource() OVERRIDE; | 273 virtual void ViewSource() OVERRIDE; |
273 virtual void ViewFrameSource(const GURL& url, | 274 virtual void ViewFrameSource(const GURL& url, |
274 const PageState& page_state) OVERRIDE; | 275 const PageState& page_state) OVERRIDE; |
275 virtual int GetMinimumZoomPercent() const OVERRIDE; | 276 virtual int GetMinimumZoomPercent() const OVERRIDE; |
276 virtual int GetMaximumZoomPercent() const OVERRIDE; | 277 virtual int GetMaximumZoomPercent() const OVERRIDE; |
277 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 278 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
278 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 279 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
279 virtual bool HasOpener() const OVERRIDE; | 280 virtual bool HasOpener() const OVERRIDE; |
280 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE; | 281 virtual void DidChooseColorInColorChooser(SkColor color) OVERRIDE; |
281 virtual void DidEndColorChooser() OVERRIDE; | 282 virtual void DidEndColorChooser() OVERRIDE; |
282 virtual int DownloadImage(const GURL& url, | 283 virtual int DownloadImage(const GURL& url, |
283 bool is_favicon, | 284 bool is_favicon, |
284 uint32_t max_bitmap_size, | 285 uint32_t max_bitmap_size, |
285 const ImageDownloadCallback& callback) OVERRIDE; | 286 const ImageDownloadCallback& callback) OVERRIDE; |
286 virtual bool IsSubframe() const OVERRIDE; | 287 virtual bool IsSubframe() const OVERRIDE; |
287 virtual void Find(int request_id, | 288 virtual void Find(int request_id, |
288 const base::string16& search_text, | 289 const base::string16& search_text, |
289 const blink::WebFindOptions& options) OVERRIDE; | 290 const blink::WebFindOptions& options) OVERRIDE; |
290 virtual void SetZoomLevel(double level) OVERRIDE; | 291 virtual void SetZoomMode(ZoomMode mode) OVERRIDE; |
| 292 virtual int SetZoomLevel(double level) OVERRIDE; |
291 virtual void StopFinding(StopFindAction action) OVERRIDE; | 293 virtual void StopFinding(StopFindAction action) OVERRIDE; |
292 #if defined(OS_ANDROID) | 294 #if defined(OS_ANDROID) |
293 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() | 295 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() |
294 OVERRIDE; | 296 OVERRIDE; |
295 #endif | 297 #endif |
296 | 298 |
297 // Implementation of PageNavigator. | 299 // Implementation of PageNavigator. |
298 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; | 300 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; |
299 | 301 |
300 // Implementation of IPC::Sender. | 302 // Implementation of IPC::Sender. |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 int fullscreen_widget_routing_id_; | 1046 int fullscreen_widget_routing_id_; |
1045 | 1047 |
1046 // Maps the ids of pending image downloads to their callbacks | 1048 // Maps the ids of pending image downloads to their callbacks |
1047 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; | 1049 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; |
1048 ImageDownloadMap image_download_map_; | 1050 ImageDownloadMap image_download_map_; |
1049 | 1051 |
1050 // Whether this WebContents is responsible for displaying a subframe in a | 1052 // Whether this WebContents is responsible for displaying a subframe in a |
1051 // different process from its parent page. | 1053 // different process from its parent page. |
1052 bool is_subframe_; | 1054 bool is_subframe_; |
1053 | 1055 |
| 1056 // Defines how zoom changes are handled. |
| 1057 ZoomMode current_zoom_mode_; |
| 1058 |
| 1059 // Used to create a unique zoom ID for every call to SetZoomlevel(). |
| 1060 int current_zoom_id_; |
| 1061 |
1054 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1062 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1055 }; | 1063 }; |
1056 | 1064 |
1057 } // namespace content | 1065 } // namespace content |
1058 | 1066 |
1059 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1067 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |