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