refactor: inline and rename findInPage request id (#26524)

This commit is contained in:
Jeremy Rose 2020-11-17 14:15:07 -08:00 committed by GitHub
parent 784172b6ca
commit 29211a51df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -2627,7 +2627,7 @@ uint32_t WebContents::FindInPage(gin::Arguments* args) {
return 0;
}
uint32_t request_id = GetNextRequestId();
uint32_t request_id = ++find_in_page_request_id_;
gin_helper::Dictionary dict;
auto options = blink::mojom::FindOptions::New();
if (args->GetNext(&dict)) {

View file

@ -598,8 +598,6 @@ class WebContents : public gin::Wrappable<WebContents>,
content::RenderFrameHost* render_frame_host);
void OnElectronBrowserConnectionError();
uint32_t GetNextRequestId() { return ++request_id_; }
#if BUILDFLAG(ENABLE_OSR)
OffScreenWebContentsView* GetOffScreenWebContentsView() const;
OffScreenRenderWidgetHostView* GetOffScreenRenderWidgetHostView() const;
@ -735,7 +733,7 @@ class WebContents : public gin::Wrappable<WebContents>,
int32_t id_;
// Request id used for findInPage request.
uint32_t request_id_ = 0;
uint32_t find_in_page_request_id_ = 0;
// Whether background throttling is disabled.
bool background_throttling_ = true;