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

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

Issue 1408393003: Propagate pageScaleFactor to GuestViews (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Give OnPageScaleFactorChanged suitable behaviour upon navigation Created 5 years, 1 month 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
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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 RendererPreferences* GetMutableRendererPrefs() override; 343 RendererPreferences* GetMutableRendererPrefs() override;
344 void Close() override; 344 void Close() override;
345 void SystemDragEnded() override; 345 void SystemDragEnded() override;
346 void UserGestureDone() override; 346 void UserGestureDone() override;
347 void SetClosedByUserGesture(bool value) override; 347 void SetClosedByUserGesture(bool value) override;
348 bool GetClosedByUserGesture() const override; 348 bool GetClosedByUserGesture() const override;
349 void ViewSource() override; 349 void ViewSource() override;
350 void ViewFrameSource(const GURL& url, const PageState& page_state) override; 350 void ViewFrameSource(const GURL& url, const PageState& page_state) override;
351 int GetMinimumZoomPercent() const override; 351 int GetMinimumZoomPercent() const override;
352 int GetMaximumZoomPercent() const override; 352 int GetMaximumZoomPercent() const override;
353 void ResetPageScale() override; 353 void SetPageScale(float page_scale_factor) override;
354 gfx::Size GetPreferredSize() const override; 354 gfx::Size GetPreferredSize() const override;
355 bool GotResponseToLockMouseRequest(bool allowed) override; 355 bool GotResponseToLockMouseRequest(bool allowed) override;
356 bool HasOpener() const override; 356 bool HasOpener() const override;
357 WebContentsImpl* GetOpener() const override; 357 WebContentsImpl* GetOpener() const override;
358 void DidChooseColorInColorChooser(SkColor color) override; 358 void DidChooseColorInColorChooser(SkColor color) override;
359 void DidEndColorChooser() override; 359 void DidEndColorChooser() override;
360 int DownloadImage(const GURL& url, 360 int DownloadImage(const GURL& url,
361 bool is_favicon, 361 bool is_favicon,
362 uint32_t max_bitmap_size, 362 uint32_t max_bitmap_size,
363 bool bypass_cache, 363 bool bypass_cache,
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 const std::string& mime_type, 825 const std::string& mime_type,
826 ResourceType resource_type); 826 ResourceType resource_type);
827 void OnDidDisplayInsecureContent(); 827 void OnDidDisplayInsecureContent();
828 void OnDidRunInsecureContent(const std::string& security_origin, 828 void OnDidRunInsecureContent(const std::string& security_origin,
829 const GURL& target_url); 829 const GURL& target_url);
830 void OnDocumentLoadedInFrame(); 830 void OnDocumentLoadedInFrame();
831 void OnDidFinishLoad(const GURL& url); 831 void OnDidFinishLoad(const GURL& url);
832 void OnGoToEntryAtOffset(int offset); 832 void OnGoToEntryAtOffset(int offset);
833 void OnUpdateZoomLimits(int minimum_percent, 833 void OnUpdateZoomLimits(int minimum_percent,
834 int maximum_percent); 834 int maximum_percent);
835 void OnPageScaleFactorChanged(float page_scale_factor);
835 void OnEnumerateDirectory(int request_id, const base::FilePath& path); 836 void OnEnumerateDirectory(int request_id, const base::FilePath& path);
836 837
837 void OnRegisterProtocolHandler(const std::string& protocol, 838 void OnRegisterProtocolHandler(const std::string& protocol,
838 const GURL& url, 839 const GURL& url,
839 const base::string16& title, 840 const base::string16& title,
840 bool user_gesture); 841 bool user_gesture);
841 void OnUnregisterProtocolHandler(const std::string& protocol, 842 void OnUnregisterProtocolHandler(const std::string& protocol,
842 const GURL& url, 843 const GURL& url,
843 bool user_gesture); 844 bool user_gesture);
844 void OnFindReply(int request_id, 845 void OnFindReply(int request_id,
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 1306
1306 #if defined(ENABLE_BROWSER_CDMS) 1307 #if defined(ENABLE_BROWSER_CDMS)
1307 // Manages all the media player and CDM managers and forwards IPCs to them. 1308 // Manages all the media player and CDM managers and forwards IPCs to them.
1308 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; 1309 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_;
1309 #endif 1310 #endif
1310 1311
1311 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; 1312 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_;
1312 1313
1313 PageImportanceSignals page_importance_signals_; 1314 PageImportanceSignals page_importance_signals_;
1314 1315
1316 bool page_scale_factor_is_one_;
1317
1315 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; 1318 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_;
1316 1319
1317 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1320 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1318 }; 1321 };
1319 1322
1320 // Dangerous methods which should never be made part of the public API, so we 1323 // Dangerous methods which should never be made part of the public API, so we
1321 // grant their use only to an explicit friend list (c++ attorney/client idiom). 1324 // grant their use only to an explicit friend list (c++ attorney/client idiom).
1322 class CONTENT_EXPORT WebContentsImpl::FriendZone { 1325 class CONTENT_EXPORT WebContentsImpl::FriendZone {
1323 private: 1326 private:
1324 friend class TestNavigationObserver; 1327 friend class TestNavigationObserver;
1325 friend class WebContentsAddedObserver; 1328 friend class WebContentsAddedObserver;
1326 friend class ContentBrowserSanityChecker; 1329 friend class ContentBrowserSanityChecker;
1327 1330
1328 FriendZone(); // Not instantiable. 1331 FriendZone(); // Not instantiable.
1329 1332
1330 // Adds/removes a callback called on creation of each new WebContents. 1333 // Adds/removes a callback called on creation of each new WebContents.
1331 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1334 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1332 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1335 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1333 1336
1334 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1337 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1335 }; 1338 };
1336 1339
1337 } // namespace content 1340 } // namespace content
1338 1341
1339 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1342 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698