-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ShouldTriggerContextMenu with params from the Context Menu.
Move the context menu check from ComposeManager to ChromeComposeClient, as we eventually need RenderFrameHost which cannot be passed into components/. Bug: b:305798934 Change-Id: Iac9a027c296de227bb725d9ce6807acf8a43b270 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4973816 Commit-Queue: Sophey Dong <sophey@chromium.org> Reviewed-by: Peter Williamson <petewil@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1217271}
- Loading branch information
Sophey
authored and
Chromium LUCI CQ
committed
Oct 30, 2023
1 parent
a6b0cb9
commit 533025a
Showing
20 changed files
with
177 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chrome/browser/compose/mock_chrome_compose_client.h" | ||
|
||
MockChromeComposeClient::MockChromeComposeClient( | ||
content::WebContents* web_contents) | ||
: ChromeComposeClient(web_contents) {} | ||
|
||
MockChromeComposeClient::~MockChromeComposeClient() = default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROME_BROWSER_COMPOSE_MOCK_CHROME_COMPOSE_CLIENT_H_ | ||
#define CHROME_BROWSER_COMPOSE_MOCK_CHROME_COMPOSE_CLIENT_H_ | ||
|
||
#include "chrome/browser/compose/chrome_compose_client.h" | ||
#include "components/autofill/core/browser/autofill_client.h" | ||
#include "testing/gmock/include/gmock/gmock.h" | ||
#include "url/gurl.h" | ||
|
||
class MockChromeComposeClient : public ChromeComposeClient { | ||
public: | ||
explicit MockChromeComposeClient(content::WebContents* web_contents); | ||
~MockChromeComposeClient() override; | ||
|
||
MOCK_METHOD(bool, | ||
ShouldTriggerContextMenu, | ||
(content::RenderFrameHost*, content::ContextMenuParams&), | ||
(override)); | ||
}; | ||
|
||
#endif // CHROME_BROWSER_COMPOSE_MOCK_CHROME_COMPOSE_CLIENT_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.