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

Unified Diff: chrome/browser/ui/app_list/search_answer_web_contents_delegate.h

Issue 2840673002: Opening links clicked from the answer card in a new tab. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search_answer_web_contents_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search_answer_web_contents_delegate.h
diff --git a/chrome/browser/ui/app_list/search_answer_web_contents_delegate.h b/chrome/browser/ui/app_list/search_answer_web_contents_delegate.h
index aa295c114e88b2be21e08dabba5fe6806425aacf..9959e10813918348b1bf5ed322385b68b4591a0f 100644
--- a/chrome/browser/ui/app_list/search_answer_web_contents_delegate.h
+++ b/chrome/browser/ui/app_list/search_answer_web_contents_delegate.h
@@ -12,14 +12,12 @@
#include "content/public/browser/web_contents_observer.h"
#include "url/gurl.h"
+class Profile;
+
namespace app_list {
class AppListModel;
}
-namespace content {
-class BrowserContext;
-}
-
namespace views {
class View;
class WebView;
@@ -31,7 +29,7 @@ namespace app_list {
class SearchAnswerWebContentsDelegate : public content::WebContentsDelegate,
public content::WebContentsObserver {
public:
- SearchAnswerWebContentsDelegate(content::BrowserContext* browser_context,
+ SearchAnswerWebContentsDelegate(Profile* profile,
app_list::AppListModel* model);
~SearchAnswerWebContentsDelegate() override;
@@ -48,6 +46,9 @@ class SearchAnswerWebContentsDelegate : public content::WebContentsDelegate,
// content::WebContentsDelegate overrides:
void UpdatePreferredSize(content::WebContents* web_contents,
const gfx::Size& pref_size) override;
+ content::WebContents* OpenURLFromTab(
+ content::WebContents* source,
+ const content::OpenURLParams& params) override;
// content::WebContentsObserver overrides:
void DidFinishNavigation(
@@ -55,6 +56,9 @@ class SearchAnswerWebContentsDelegate : public content::WebContentsDelegate,
void DidStopLoading() override;
private:
+ // Unowned pointer to the associated profile.
+ Profile* const profile_;
+
// Unowned pointer to app list model.
app_list::AppListModel* const model_;
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search_answer_web_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698