Commit ca6cb1bc authored by vadimt's avatar vadimt Committed by Commit bot

Never showing context menu from the answer card.

Per UX.

Bug=712331

Review-Url: https://codereview.chromium.org/2847583003
Cr-Commit-Position: refs/heads/master@{#467759}
parent ae63c3b9
...@@ -112,6 +112,12 @@ content::WebContents* SearchAnswerWebContentsDelegate::OpenURLFromTab( ...@@ -112,6 +112,12 @@ content::WebContents* SearchAnswerWebContentsDelegate::OpenURLFromTab(
return new_tab_params.target_contents; return new_tab_params.target_contents;
} }
bool SearchAnswerWebContentsDelegate::HandleContextMenu(
const content::ContextMenuParams& params) {
// Disable showing the menu.
return true;
}
void SearchAnswerWebContentsDelegate::DidFinishNavigation( void SearchAnswerWebContentsDelegate::DidFinishNavigation(
content::NavigationHandle* navigation_handle) { content::NavigationHandle* navigation_handle) {
if (navigation_handle->GetURL() != current_request_url_) if (navigation_handle->GetURL() != current_request_url_)
......
...@@ -46,10 +46,13 @@ class SearchAnswerWebContentsDelegate : public content::WebContentsDelegate, ...@@ -46,10 +46,13 @@ class SearchAnswerWebContentsDelegate : public content::WebContentsDelegate,
// content::WebContentsDelegate overrides: // content::WebContentsDelegate overrides:
void UpdatePreferredSize(content::WebContents* web_contents, void UpdatePreferredSize(content::WebContents* web_contents,
const gfx::Size& pref_size) override; const gfx::Size& pref_size) override;
content::WebContents* OpenURLFromTab( content::WebContents* OpenURLFromTab(
content::WebContents* source, content::WebContents* source,
const content::OpenURLParams& params) override; const content::OpenURLParams& params) override;
bool HandleContextMenu(const content::ContextMenuParams& params) override;
// content::WebContentsObserver overrides: // content::WebContentsObserver overrides:
void DidFinishNavigation( void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override; content::NavigationHandle* navigation_handle) override;
......
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