Commit 1ebb8c1f authored by James Cook's avatar James Cook Committed by Commit Bot

lacros: Rename crosapi::WindowSnapshot to crosapi::Bitmap

The structure is just a representation of a bitmap. I'd like to use it
in another API for an icon.

* Extract the mojom struct into its own file
* Rename the C++ class and mojo traits serialization helpers
* Rename the |bitmap| member to |pixels| so we don't have to type
  bitmap.bitmap

None of the implementation changed. Gerrit shows file add/deletes
because the renames touched most lines.

Bug: 1113889
Change-Id: Ie0d9aa30d913089adab52d0f4bd3ac050575e96c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352645Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarGreg Kerr <kerrnel@chromium.org>
Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Auto-Submit: James Cook <jamescook@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797510}
parent 214b555e
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "base/numerics/checked_math.h" #include "base/numerics/checked_math.h"
#include "base/numerics/safe_conversions.h" #include "base/numerics/safe_conversions.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chromeos/crosapi/cpp/window_snapshot.h" #include "chromeos/crosapi/cpp/bitmap.h"
#include "ui/snapshot/snapshot.h" #include "ui/snapshot/snapshot.h"
ScreenManagerCrosapi::ScreenManagerCrosapi() = default; ScreenManagerCrosapi::ScreenManagerCrosapi() = default;
...@@ -93,7 +93,7 @@ void ScreenManagerCrosapi::TakeWindowSnapshot( ...@@ -93,7 +93,7 @@ void ScreenManagerCrosapi::TakeWindowSnapshot(
TakeWindowSnapshotCallback callback) { TakeWindowSnapshotCallback callback) {
auto it = id_to_window_.find(id); auto it = id_to_window_.find(id);
if (it == id_to_window_.end()) { if (it == id_to_window_.end()) {
std::move(callback).Run(/*success=*/false, crosapi::WindowSnapshot()); std::move(callback).Run(/*success=*/false, crosapi::Bitmap());
return; return;
} }
...@@ -132,9 +132,9 @@ void ScreenManagerCrosapi::DidTakeSnapshot(SnapshotCallback callback, ...@@ -132,9 +132,9 @@ void ScreenManagerCrosapi::DidTakeSnapshot(SnapshotCallback callback,
uint8_t* base = static_cast<uint8_t*>(bitmap.getPixels()); uint8_t* base = static_cast<uint8_t*>(bitmap.getPixels());
std::vector<uint8_t> bytes(base, base + bitmap.computeByteSize()); std::vector<uint8_t> bytes(base, base + bitmap.computeByteSize());
crosapi::WindowSnapshot snapshot; crosapi::Bitmap snapshot;
snapshot.width = bitmap.width(); snapshot.width = bitmap.width();
snapshot.height = bitmap.height(); snapshot.height = bitmap.height();
snapshot.bitmap.swap(bytes); snapshot.pixels.swap(bytes);
std::move(callback).Run(std::move(snapshot)); std::move(callback).Run(std::move(snapshot));
} }
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
#include "ui/aura/window_observer.h" #include "ui/aura/window_observer.h"
#include "ui/gfx/image/image.h" #include "ui/gfx/image/image.h"
namespace crosapi {
struct Bitmap;
} // namespace crosapi
// This class is the ash-chrome implementation of the ScreenManager interface. // This class is the ash-chrome implementation of the ScreenManager interface.
// This class must only be used from the main thread. // This class must only be used from the main thread.
class ScreenManagerCrosapi : public crosapi::mojom::ScreenManager, class ScreenManagerCrosapi : public crosapi::mojom::ScreenManager,
...@@ -42,8 +46,7 @@ class ScreenManagerCrosapi : public crosapi::mojom::ScreenManager, ...@@ -42,8 +46,7 @@ class ScreenManagerCrosapi : public crosapi::mojom::ScreenManager,
void OnWindowDestroying(aura::Window* window) final; void OnWindowDestroying(aura::Window* window) final;
private: private:
using SnapshotCallback = using SnapshotCallback = base::OnceCallback<void(const crosapi::Bitmap&)>;
base::OnceCallback<void(const crosapi::WindowSnapshot&)>;
void DidTakeSnapshot(SnapshotCallback callback, gfx::Image image); void DidTakeSnapshot(SnapshotCallback callback, gfx::Image image);
// This class generates unique, non-reused IDs for windows on demand. The IDs // This class generates unique, non-reused IDs for windows on demand. The IDs
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/browser_window.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "chromeos/crosapi/cpp/window_snapshot.h" #include "chromeos/crosapi/cpp/bitmap.h"
#include "chromeos/crosapi/mojom/screen_manager.mojom.h" #include "chromeos/crosapi/mojom/screen_manager.mojom.h"
#include "content/public/test/browser_test.h" #include "content/public/test/browser_test.h"
#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/remote.h"
...@@ -82,12 +82,12 @@ class ScreenManagerCrosapiBrowserTest : public InProcessBrowserTest { ...@@ -82,12 +82,12 @@ class ScreenManagerCrosapiBrowserTest : public InProcessBrowserTest {
// Tests that taking a screen snapshot works. // Tests that taking a screen snapshot works.
IN_PROC_BROWSER_TEST_F(ScreenManagerCrosapiBrowserTest, TakeScreenSnapshot) { IN_PROC_BROWSER_TEST_F(ScreenManagerCrosapiBrowserTest, TakeScreenSnapshot) {
base::RunLoop run_loop; base::RunLoop run_loop;
crosapi::WindowSnapshot snapshot; crosapi::Bitmap snapshot;
// Take a snapshot on a background sequence. The call is blocking, so when it // Take a snapshot on a background sequence. The call is blocking, so when it
// finishes, we can also unblock the main thread. // finishes, we can also unblock the main thread.
auto take_snapshot_background = base::BindOnce( auto take_snapshot_background = base::BindOnce(
[](SMRemote* remote, crosapi::WindowSnapshot* snapshot) { [](SMRemote* remote, crosapi::Bitmap* snapshot) {
mojo::ScopedAllowSyncCallForTesting allow_sync; mojo::ScopedAllowSyncCallForTesting allow_sync;
(*remote)->TakeScreenSnapshot(snapshot); (*remote)->TakeScreenSnapshot(snapshot);
}, },
...@@ -106,12 +106,12 @@ IN_PROC_BROWSER_TEST_F(ScreenManagerCrosapiBrowserTest, TakeScreenSnapshot) { ...@@ -106,12 +106,12 @@ IN_PROC_BROWSER_TEST_F(ScreenManagerCrosapiBrowserTest, TakeScreenSnapshot) {
IN_PROC_BROWSER_TEST_F(ScreenManagerCrosapiBrowserTest, TakeWindowSnapshot) { IN_PROC_BROWSER_TEST_F(ScreenManagerCrosapiBrowserTest, TakeWindowSnapshot) {
base::RunLoop run_loop; base::RunLoop run_loop;
bool success; bool success;
crosapi::WindowSnapshot snapshot; crosapi::Bitmap snapshot;
// Take a snapshot on a background sequence. The call is blocking, so when it // Take a snapshot on a background sequence. The call is blocking, so when it
// finishes, we can also unblock the main thread. // finishes, we can also unblock the main thread.
auto take_snapshot_background = base::BindOnce( auto take_snapshot_background = base::BindOnce(
[](SMRemote* remote, bool* success, crosapi::WindowSnapshot* snapshot) { [](SMRemote* remote, bool* success, crosapi::Bitmap* snapshot) {
mojo::ScopedAllowSyncCallForTesting allow_sync; mojo::ScopedAllowSyncCallForTesting allow_sync;
std::vector<crosapi::mojom::WindowDetailsPtr> windows; std::vector<crosapi::mojom::WindowDetailsPtr> windows;
(*remote)->ListWindows(&windows); (*remote)->ListWindows(&windows);
......
...@@ -10,8 +10,8 @@ config("crosapi_implementation") { ...@@ -10,8 +10,8 @@ config("crosapi_implementation") {
component("cpp") { component("cpp") {
output_name = "crosapi_public_cpp" output_name = "crosapi_public_cpp"
sources = [ sources = [
"window_snapshot.cc", "bitmap.cc",
"window_snapshot.h", "bitmap.h",
] ]
configs += [ ":crosapi_implementation" ] configs += [ ":crosapi_implementation" ]
deps = [ "//base" ] deps = [ "//base" ]
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chromeos/crosapi/cpp/window_snapshot.h" #include "chromeos/crosapi/cpp/bitmap.h"
namespace crosapi { namespace crosapi {
WindowSnapshot::WindowSnapshot() = default; Bitmap::Bitmap() = default;
WindowSnapshot::~WindowSnapshot() = default; Bitmap::~Bitmap() = default;
} // namespace crosapi } // namespace crosapi
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROMEOS_CROSAPI_CPP_WINDOW_SNAPSHOT_H_ #ifndef CHROMEOS_CROSAPI_CPP_BITMAP_H_
#define CHROMEOS_CROSAPI_CPP_WINDOW_SNAPSHOT_H_ #define CHROMEOS_CROSAPI_CPP_BITMAP_H_
#include <stdint.h> #include <stdint.h>
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
namespace crosapi { namespace crosapi {
// bitmap is a 4-byte RGBA bitmap representation of the window. Its size must // A 4-byte RGBA bitmap representation. Its size must be exactly equal to
// be exactly equal to width * height * 4. // width * height * 4.
struct COMPONENT_EXPORT(CROSAPI) WindowSnapshot { struct COMPONENT_EXPORT(CROSAPI) Bitmap {
WindowSnapshot(); Bitmap();
~WindowSnapshot(); ~Bitmap();
uint32_t width = 0; uint32_t width = 0;
uint32_t height = 0; uint32_t height = 0;
std::vector<uint8_t> bitmap; std::vector<uint8_t> pixels;
}; };
} // namespace crosapi } // namespace crosapi
#endif // CHROMEOS_CROSAPI_CPP_WINDOW_SNAPSHOT_H_ #endif // CHROMEOS_CROSAPI_CPP_BITMAP_H_
...@@ -7,6 +7,7 @@ import("//mojo/public/tools/bindings/mojom.gni") ...@@ -7,6 +7,7 @@ import("//mojo/public/tools/bindings/mojom.gni")
mojom("mojom") { mojom("mojom") {
sources = [ sources = [
"attestation.mojom", "attestation.mojom",
"bitmap.mojom",
"crosapi.mojom", "crosapi.mojom",
"screen_manager.mojom", "screen_manager.mojom",
"select_file.mojom", "select_file.mojom",
...@@ -16,12 +17,11 @@ mojom("mojom") { ...@@ -16,12 +17,11 @@ mojom("mojom") {
{ {
types = [ types = [
{ {
mojom = "crosapi.mojom.WindowSnapshot" mojom = "crosapi.mojom.Bitmap"
cpp = "crosapi::WindowSnapshot" cpp = "crosapi::Bitmap"
}, },
] ]
traits_headers = traits_headers = [ "//chromeos/crosapi/mojom/bitmap_mojom_traits.h" ]
[ "//chromeos/crosapi/mojom/window_snapshot_mojom_traits.h" ]
traits_public_deps = [ traits_public_deps = [
":mojom_traits", ":mojom_traits",
"//chromeos/crosapi/cpp", "//chromeos/crosapi/cpp",
...@@ -39,8 +39,8 @@ component("mojom_traits") { ...@@ -39,8 +39,8 @@ component("mojom_traits") {
output_name = "crosapi_mojom_traits" output_name = "crosapi_mojom_traits"
sources = [ sources = [
"window_snapshot_mojom_traits.cc", "bitmap_mojom_traits.cc",
"window_snapshot_mojom_traits.h", "bitmap_mojom_traits.h",
] ]
defines = [ "IS_CROSAPI_MOJOM_TRAITS_IMPL" ] defines = [ "IS_CROSAPI_MOJOM_TRAITS_IMPL" ]
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module crosapi.mojom;
// Each pixel is represented by 4 bytes [RGBA].
// TODO(https://crbug.com/1094460): Use a more performant transport mechanism.
struct Bitmap {
uint32 width;
uint32 height;
array<uint8> pixels;
};
...@@ -2,32 +2,31 @@ ...@@ -2,32 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chromeos/crosapi/mojom/window_snapshot_mojom_traits.h" #include "chromeos/crosapi/mojom/bitmap_mojom_traits.h"
#include "base/numerics/checked_math.h" #include "base/numerics/checked_math.h"
namespace mojo { namespace mojo {
// static // static
bool StructTraits< bool StructTraits<crosapi::mojom::BitmapDataView, crosapi::Bitmap>::Read(
crosapi::mojom::WindowSnapshotDataView, crosapi::mojom::BitmapDataView data,
crosapi::WindowSnapshot>::Read(crosapi::mojom::WindowSnapshotDataView data, crosapi::Bitmap* out) {
crosapi::WindowSnapshot* out) {
out->width = data.width(); out->width = data.width();
out->height = data.height(); out->height = data.height();
ArrayDataView<uint8_t> bitmap; ArrayDataView<uint8_t> pixels;
data.GetBitmapDataView(&bitmap); data.GetPixelsDataView(&pixels);
uint32_t size; uint32_t size;
size = base::CheckMul(out->width, out->height).ValueOrDie(); size = base::CheckMul(out->width, out->height).ValueOrDie();
size = base::CheckMul(size, 4).ValueOrDie(); size = base::CheckMul(size, 4).ValueOrDie();
if (bitmap.size() != base::checked_cast<size_t>(size)) if (pixels.size() != base::checked_cast<size_t>(size))
return false; return false;
const uint8_t* base = bitmap.data(); const uint8_t* base = pixels.data();
out->bitmap.assign(base, base + bitmap.size()); out->pixels.assign(base, base + pixels.size());
return true; return true;
} }
......
...@@ -2,34 +2,29 @@ ...@@ -2,34 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROMEOS_CROSAPI_MOJOM_WINDOW_SNAPSHOT_MOJOM_TRAITS_H_ #ifndef CHROMEOS_CROSAPI_MOJOM_BITMAP_MOJOM_TRAITS_H_
#define CHROMEOS_CROSAPI_MOJOM_WINDOW_SNAPSHOT_MOJOM_TRAITS_H_ #define CHROMEOS_CROSAPI_MOJOM_BITMAP_MOJOM_TRAITS_H_
#include "base/component_export.h" #include "base/component_export.h"
#include "chromeos/crosapi/cpp/window_snapshot.h" #include "chromeos/crosapi/cpp/bitmap.h"
#include "chromeos/crosapi/mojom/screen_manager.mojom-shared.h" #include "chromeos/crosapi/mojom/bitmap.mojom-shared.h"
#include "mojo/public/cpp/bindings/struct_traits.h" #include "mojo/public/cpp/bindings/struct_traits.h"
namespace mojo { namespace mojo {
template <> template <>
struct COMPONENT_EXPORT(CROSAPI_MOJOM_TRAITS) struct COMPONENT_EXPORT(CROSAPI_MOJOM_TRAITS)
StructTraits<crosapi::mojom::WindowSnapshotDataView, StructTraits<crosapi::mojom::BitmapDataView, crosapi::Bitmap> {
crosapi::WindowSnapshot> { static uint32_t width(const crosapi::Bitmap& bitmap) { return bitmap.width; }
static uint32_t width(const crosapi::WindowSnapshot& snapshot) { static uint32_t height(const crosapi::Bitmap& bitmap) {
return snapshot.width; return bitmap.height;
} }
static uint32_t height(const crosapi::WindowSnapshot& snapshot) { static const std::vector<uint8_t>& pixels(const crosapi::Bitmap& bitmap) {
return snapshot.height; return bitmap.pixels;
} }
static const std::vector<uint8_t>& bitmap( static bool Read(crosapi::mojom::BitmapDataView, crosapi::Bitmap* out);
const crosapi::WindowSnapshot& snapshot) {
return snapshot.bitmap;
}
static bool Read(crosapi::mojom::WindowSnapshotDataView,
crosapi::WindowSnapshot* out);
}; };
} // namespace mojo } // namespace mojo
#endif // CHROMEOS_CROSAPI_MOJOM_WINDOW_SNAPSHOT_MOJOM_TRAITS_H_ #endif // CHROMEOS_CROSAPI_MOJOM_BITMAP_MOJOM_TRAITS_H_
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
module crosapi.mojom; module crosapi.mojom;
import "chromeos/crosapi/mojom/bitmap.mojom";
// A unique identifier and title for a window. // A unique identifier and title for a window.
struct WindowDetails { struct WindowDetails {
// Guaranteed to be unique and never reused. // Guaranteed to be unique and never reused.
...@@ -13,14 +15,6 @@ struct WindowDetails { ...@@ -13,14 +15,6 @@ struct WindowDetails {
string title; string title;
}; };
// A bitmap representation of the current contents of a window or screen. Each
// pixel is represented by 4 bytes [RGBA].
struct WindowSnapshot {
uint32 width;
uint32 height;
array<uint8> bitmap;
};
// This interface is implemented by ash-chrome. It allows lacros-chrome to query // This interface is implemented by ash-chrome. It allows lacros-chrome to query
// information about existing windows, screens, and displays. // information about existing windows, screens, and displays.
// //
...@@ -45,7 +39,7 @@ interface ScreenManager { ...@@ -45,7 +39,7 @@ interface ScreenManager {
// The media screen capture implementation assumes that every platform // The media screen capture implementation assumes that every platform
// provides a synchronous method to take a snapshot of the screen. // provides a synchronous method to take a snapshot of the screen.
[Sync] [Sync]
TakeScreenSnapshot@0() => (WindowSnapshot snapshot); TakeScreenSnapshot@0() => (Bitmap snapshot);
// Synchronously returns a list of visible, focusable windows. This method // Synchronously returns a list of visible, focusable windows. This method
// needs to be synchronous to support cross-platform code that relies on the // needs to be synchronous to support cross-platform code that relies on the
...@@ -56,6 +50,5 @@ interface ScreenManager { ...@@ -56,6 +50,5 @@ interface ScreenManager {
// Take a screenshot of a window with an id from ListWindows. If |success| // Take a screenshot of a window with an id from ListWindows. If |success|
// is false, then the window no longer exists. // is false, then the window no longer exists.
[Sync] [Sync]
TakeWindowSnapshot@2(uint64 id) => (bool success, WindowSnapshot snapshot); TakeWindowSnapshot@2(uint64 id) => (bool success, Bitmap snapshot);
}; };
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/task/task_traits.h" #include "base/task/task_traits.h"
#include "base/task/thread_pool.h" #include "base/task/thread_pool.h"
#include "chromeos/crosapi/cpp/window_snapshot.h" #include "chromeos/crosapi/cpp/bitmap.h"
#include "chromeos/lacros/lacros_chrome_service_impl.h" #include "chromeos/lacros/lacros_chrome_service_impl.h"
namespace content { namespace content {
...@@ -75,7 +75,7 @@ void DesktopCapturerLacros::Start(Callback* callback) { ...@@ -75,7 +75,7 @@ void DesktopCapturerLacros::Start(Callback* callback) {
void DesktopCapturerLacros::CaptureFrame() { void DesktopCapturerLacros::CaptureFrame() {
if (capture_type_ == kScreen) { if (capture_type_ == kScreen) {
crosapi::WindowSnapshot snapshot; crosapi::Bitmap snapshot;
{ {
// lacros-chrome is allowed to make sync calls to ash-chrome. // lacros-chrome is allowed to make sync calls to ash-chrome.
mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call;
...@@ -84,7 +84,7 @@ void DesktopCapturerLacros::CaptureFrame() { ...@@ -84,7 +84,7 @@ void DesktopCapturerLacros::CaptureFrame() {
DidTakeSnapshot(/*success=*/true, snapshot); DidTakeSnapshot(/*success=*/true, snapshot);
} else { } else {
bool success; bool success;
crosapi::WindowSnapshot snapshot; crosapi::Bitmap snapshot;
{ {
// lacros-chrome is allowed to make sync calls to ash-chrome. // lacros-chrome is allowed to make sync calls to ash-chrome.
mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call;
...@@ -104,9 +104,8 @@ void DesktopCapturerLacros::SetSharedMemoryFactory( ...@@ -104,9 +104,8 @@ void DesktopCapturerLacros::SetSharedMemoryFactory(
void DesktopCapturerLacros::SetExcludedWindow(webrtc::WindowId window) {} void DesktopCapturerLacros::SetExcludedWindow(webrtc::WindowId window) {}
void DesktopCapturerLacros::DidTakeSnapshot( void DesktopCapturerLacros::DidTakeSnapshot(bool success,
bool success, const crosapi::Bitmap& snapshot) {
const crosapi::WindowSnapshot& snapshot) {
if (!success) { if (!success) {
callback_->OnCaptureResult(Result::ERROR_PERMANENT, callback_->OnCaptureResult(Result::ERROR_PERMANENT,
std::unique_ptr<webrtc::DesktopFrame>()); std::unique_ptr<webrtc::DesktopFrame>());
...@@ -120,7 +119,7 @@ void DesktopCapturerLacros::DidTakeSnapshot( ...@@ -120,7 +119,7 @@ void DesktopCapturerLacros::DidTakeSnapshot(
// This code assumes that the stride is 4 * width. This relies on the // This code assumes that the stride is 4 * width. This relies on the
// assumption that there's no padding and each pixel is 4 bytes. // assumption that there's no padding and each pixel is 4 bytes.
frame->CopyPixelsFrom( frame->CopyPixelsFrom(
snapshot.bitmap.data(), 4 * snapshot.width, snapshot.pixels.data(), 4 * snapshot.width,
webrtc::DesktopRect::MakeWH(snapshot.width, snapshot.height)); webrtc::DesktopRect::MakeWH(snapshot.width, snapshot.height));
callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); callback_->OnCaptureResult(Result::SUCCESS, std::move(frame));
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
namespace crosapi { namespace crosapi {
struct WindowSnapshot; struct Bitmap;
} // namespace crosapi } // namespace crosapi
namespace content { namespace content {
...@@ -46,7 +46,7 @@ class DesktopCapturerLacros : public webrtc::DesktopCapturer { ...@@ -46,7 +46,7 @@ class DesktopCapturerLacros : public webrtc::DesktopCapturer {
private: private:
// Callback for when ash-chrome returns a snapshot of the screen or window as // Callback for when ash-chrome returns a snapshot of the screen or window as
// a bitmap. // a bitmap.
void DidTakeSnapshot(bool success, const crosapi::WindowSnapshot& snapshot); void DidTakeSnapshot(bool success, const crosapi::Bitmap& snapshot);
// Whether this object is capturing screens or windows. // Whether this object is capturing screens or windows.
const CaptureType capture_type_; const CaptureType capture_type_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment