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

Side by Side Diff: extensions/browser/api/guest_view/web_view/web_view_internal_api.h

Issue 1863953002: <webview>: Fix missing transparency in captureVisibleRegion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply wjmaclean's comments. Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_
6 #define EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ 6 #define EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 25 matching lines...) Expand all
36 private: 36 private:
37 virtual bool RunAsyncSafe(WebViewGuest* guest) = 0; 37 virtual bool RunAsyncSafe(WebViewGuest* guest) = 0;
38 }; 38 };
39 39
40 class WebViewInternalCaptureVisibleRegionFunction 40 class WebViewInternalCaptureVisibleRegionFunction
41 : public WebViewInternalExtensionFunction, 41 : public WebViewInternalExtensionFunction,
42 public WebContentsCaptureClient { 42 public WebContentsCaptureClient {
43 public: 43 public:
44 DECLARE_EXTENSION_FUNCTION("webViewInternal.captureVisibleRegion", 44 DECLARE_EXTENSION_FUNCTION("webViewInternal.captureVisibleRegion",
45 WEBVIEWINTERNAL_CAPTUREVISIBLEREGION); 45 WEBVIEWINTERNAL_CAPTUREVISIBLEREGION);
46 WebViewInternalCaptureVisibleRegionFunction() {} 46 WebViewInternalCaptureVisibleRegionFunction() {}
Finnur 2016/04/07 10:08:33 is_guest_transparent_(false) ... or something.
avallee 2016/04/07 14:21:16 Done.
47 47
48 protected: 48 protected:
49 ~WebViewInternalCaptureVisibleRegionFunction() override {} 49 ~WebViewInternalCaptureVisibleRegionFunction() override {}
50 50
51 private: 51 private:
52 // WebViewInternalExtensionFunction implementation. 52 // WebViewInternalExtensionFunction implementation.
53 bool RunAsyncSafe(WebViewGuest* guest) override; 53 bool RunAsyncSafe(WebViewGuest* guest) override;
54 54
55 // extensions::WebContentsCaptureClient: 55 // extensions::WebContentsCaptureClient:
56 bool IsScreenshotEnabled() override; 56 bool IsScreenshotEnabled() override;
57 bool ClientAllowsTransparency() override;
57 void OnCaptureSuccess(const SkBitmap& bitmap) override; 58 void OnCaptureSuccess(const SkBitmap& bitmap) override;
58 void OnCaptureFailure(FailureReason reason) override; 59 void OnCaptureFailure(FailureReason reason) override;
59 60
61 bool is_guest_transparent_;
62
60 DISALLOW_COPY_AND_ASSIGN(WebViewInternalCaptureVisibleRegionFunction); 63 DISALLOW_COPY_AND_ASSIGN(WebViewInternalCaptureVisibleRegionFunction);
61 }; 64 };
62 65
63 class WebViewInternalNavigateFunction 66 class WebViewInternalNavigateFunction
64 : public WebViewInternalExtensionFunction { 67 : public WebViewInternalExtensionFunction {
65 public: 68 public:
66 DECLARE_EXTENSION_FUNCTION("webViewInternal.navigate", 69 DECLARE_EXTENSION_FUNCTION("webViewInternal.navigate",
67 WEBVIEWINTERNAL_NAVIGATE); 70 WEBVIEWINTERNAL_NAVIGATE);
68 WebViewInternalNavigateFunction() {} 71 WebViewInternalNavigateFunction() {}
69 72
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 uint32_t remove_mask_; 482 uint32_t remove_mask_;
480 // Tracks any data related or parse errors. 483 // Tracks any data related or parse errors.
481 bool bad_message_; 484 bool bad_message_;
482 485
483 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction); 486 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction);
484 }; 487 };
485 488
486 } // namespace extensions 489 } // namespace extensions
487 490
488 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ 491 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698