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

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

Issue 224733018: Changes to content/ to facilitate new zoom extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 8 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
291 virtual void SetZoomMode(ZoomMode mode) OVERRIDE;
290 virtual void SetZoomLevel(double level) OVERRIDE; 292 virtual void SetZoomLevel(double level) OVERRIDE;
293 virtual void SetZoomLevel(
294 double level,
295 const base::Callback<void(void)>& callback) OVERRIDE;
291 virtual void StopFinding(StopFindAction action) OVERRIDE; 296 virtual void StopFinding(StopFindAction action) OVERRIDE;
292 #if defined(OS_ANDROID) 297 #if defined(OS_ANDROID)
293 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() 298 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents()
294 OVERRIDE; 299 OVERRIDE;
295 #endif 300 #endif
296 301
297 // Implementation of PageNavigator. 302 // Implementation of PageNavigator.
298 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; 303 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE;
299 304
300 // Implementation of IPC::Sender. 305 // Implementation of IPC::Sender.
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 int fullscreen_widget_routing_id_; 1049 int fullscreen_widget_routing_id_;
1045 1050
1046 // Maps the ids of pending image downloads to their callbacks 1051 // Maps the ids of pending image downloads to their callbacks
1047 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; 1052 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap;
1048 ImageDownloadMap image_download_map_; 1053 ImageDownloadMap image_download_map_;
1049 1054
1050 // Whether this WebContents is responsible for displaying a subframe in a 1055 // Whether this WebContents is responsible for displaying a subframe in a
1051 // different process from its parent page. 1056 // different process from its parent page.
1052 bool is_subframe_; 1057 bool is_subframe_;
1053 1058
1059 // Defines how zoom changes are handled.
1060 ZoomMode current_zoom_mode_;
1061
1062 // Used to create a unique zoom ID for every call to SetZoomlevel().
1063 int current_zoom_id_;
1064
1054 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1065 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1055 }; 1066 };
1056 1067
1057 } // namespace content 1068 } // namespace content
1058 1069
1059 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1070 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698