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

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

Powered by Google App Engine
This is Rietveld 408576698