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

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

Issue 2394653002: Disable download for overlay panel content (Closed)
Patch Set: rebase Created 4 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 void StopFinding(StopFindAction action) override; 410 void StopFinding(StopFindAction action) override;
411 bool WasRecentlyAudible() override; 411 bool WasRecentlyAudible() override;
412 void GetManifest(const GetManifestCallback& callback) override; 412 void GetManifest(const GetManifestCallback& callback) override;
413 void ExitFullscreen(bool will_cause_resize) override; 413 void ExitFullscreen(bool will_cause_resize) override;
414 void ResumeLoadingCreatedWebContents() override; 414 void ResumeLoadingCreatedWebContents() override;
415 void ResumeMediaSession() override; 415 void ResumeMediaSession() override;
416 void SuspendMediaSession() override; 416 void SuspendMediaSession() override;
417 void StopMediaSession() override; 417 void StopMediaSession() override;
418 void OnPasswordInputShownOnHttp() override; 418 void OnPasswordInputShownOnHttp() override;
419 void OnCreditCardInputShownOnHttp() override; 419 void OnCreditCardInputShownOnHttp() override;
420 void SetIsOverlayContent(bool is_overlay_content) override;
420 421
421 #if defined(OS_ANDROID) 422 #if defined(OS_ANDROID)
422 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; 423 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override;
423 virtual WebContentsAndroid* GetWebContentsAndroid(); 424 virtual WebContentsAndroid* GetWebContentsAndroid();
424 void ActivateNearestFindResult(float x, float y) override; 425 void ActivateNearestFindResult(float x, float y) override;
425 void RequestFindMatchRects(int current_version) override; 426 void RequestFindMatchRects(int current_version) override;
426 service_manager::InterfaceProvider* GetJavaInterfaces() override; 427 service_manager::InterfaceProvider* GetJavaInterfaces() override;
427 #elif defined(OS_MACOSX) 428 #elif defined(OS_MACOSX)
428 void SetAllowOtherViews(bool allow) override; 429 void SetAllowOtherViews(bool allow) override;
429 bool GetAllowOtherViews() override; 430 bool GetAllowOtherViews() override;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 MediaStreamType type) override; 560 MediaStreamType type) override;
560 SessionStorageNamespace* GetSessionStorageNamespace( 561 SessionStorageNamespace* GetSessionStorageNamespace(
561 SiteInstance* instance) override; 562 SiteInstance* instance) override;
562 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override; 563 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override;
563 double GetPendingPageZoomLevel() override; 564 double GetPendingPageZoomLevel() override;
564 FrameTree* GetFrameTree() override; 565 FrameTree* GetFrameTree() override;
565 void SetIsVirtualKeyboardRequested(bool requested) override; 566 void SetIsVirtualKeyboardRequested(bool requested) override;
566 bool IsVirtualKeyboardRequested() override; 567 bool IsVirtualKeyboardRequested() override;
567 bool IsOverridingUserAgent() override; 568 bool IsOverridingUserAgent() override;
568 bool IsJavaScriptDialogShowing() const override; 569 bool IsJavaScriptDialogShowing() const override;
570 bool HideDownloadUI() const override;
569 571
570 // NavigatorDelegate --------------------------------------------------------- 572 // NavigatorDelegate ---------------------------------------------------------
571 573
572 void DidStartNavigation(NavigationHandle* navigation_handle) override; 574 void DidStartNavigation(NavigationHandle* navigation_handle) override;
573 void DidRedirectNavigation(NavigationHandle* navigation_handle) override; 575 void DidRedirectNavigation(NavigationHandle* navigation_handle) override;
574 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override; 576 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override;
575 void DidFinishNavigation(NavigationHandle* navigation_handle) override; 577 void DidFinishNavigation(NavigationHandle* navigation_handle) override;
576 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, 578 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host,
577 const GURL& validated_url, 579 const GURL& validated_url,
578 bool is_error_page, 580 bool is_error_page,
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 std::unique_ptr<TextInputManager> text_input_manager_; 1425 std::unique_ptr<TextInputManager> text_input_manager_;
1424 1426
1425 // Stores the RenderWidgetHost that currently holds a mouse lock or nullptr if 1427 // Stores the RenderWidgetHost that currently holds a mouse lock or nullptr if
1426 // there's no RenderWidgetHost holding a lock. 1428 // there's no RenderWidgetHost holding a lock.
1427 RenderWidgetHostImpl* mouse_lock_widget_; 1429 RenderWidgetHostImpl* mouse_lock_widget_;
1428 1430
1429 #if defined(OS_ANDROID) 1431 #if defined(OS_ANDROID)
1430 std::unique_ptr<service_manager::InterfaceProvider> java_interfaces_; 1432 std::unique_ptr<service_manager::InterfaceProvider> java_interfaces_;
1431 #endif 1433 #endif
1432 1434
1435 // Whether this WebContents is for content overlay.
1436 bool is_overlay_content_;
1437
1433 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; 1438 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_;
1434 base::WeakPtrFactory<WebContentsImpl> weak_factory_; 1439 base::WeakPtrFactory<WebContentsImpl> weak_factory_;
1435 1440
1436 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1441 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1437 }; 1442 };
1438 1443
1439 // Dangerous methods which should never be made part of the public API, so we 1444 // Dangerous methods which should never be made part of the public API, so we
1440 // grant their use only to an explicit friend list (c++ attorney/client idiom). 1445 // grant their use only to an explicit friend list (c++ attorney/client idiom).
1441 class CONTENT_EXPORT WebContentsImpl::FriendZone { 1446 class CONTENT_EXPORT WebContentsImpl::FriendZone {
1442 private: 1447 private:
1443 friend class TestNavigationObserver; 1448 friend class TestNavigationObserver;
1444 friend class WebContentsAddedObserver; 1449 friend class WebContentsAddedObserver;
1445 friend class ContentBrowserSanityChecker; 1450 friend class ContentBrowserSanityChecker;
1446 1451
1447 FriendZone(); // Not instantiable. 1452 FriendZone(); // Not instantiable.
1448 1453
1449 // Adds/removes a callback called on creation of each new WebContents. 1454 // Adds/removes a callback called on creation of each new WebContents.
1450 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1455 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1451 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1456 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1452 1457
1453 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1458 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1454 }; 1459 };
1455 1460
1456 } // namespace content 1461 } // namespace content
1457 1462
1458 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1463 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698