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

Side by Side Diff: chrome/browser/ui/app_list/search/answer_card/answer_card_contents.h

Issue 2947283002: Unit-testing AnswerCardSearchProvider. (Closed)
Patch Set: Rebasing Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_ANSWER_CARD_ANSWER_CARD_CONTENTS_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_ANSWER_CARD_ANSWER_CARD_CONTENTS_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_ANSWER_CARD_ANSWER_CARD_CONTENTS_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_ANSWER_CARD_ANSWER_CARD_CONTENTS_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 9
10 class GURL; 10 class GURL;
11 11
12 namespace app_list { 12 namespace app_list {
13 class AnswerCardResult; 13 class AnswerCardResult;
14 } 14 }
15 15
16 namespace content { 16 namespace content {
17 class NavigationHandle; 17 class NavigationHandle;
18 struct OpenURLParams;
19 class WebContents;
20 } 18 }
21 19
22 namespace gfx { 20 namespace gfx {
23 class Size; 21 class Size;
24 } 22 }
25 23
26 namespace views { 24 namespace views {
27 class View; 25 class View;
28 } 26 }
29 27
30 namespace app_list { 28 namespace app_list {
31 29
32 // Abstract source of contents for AnswerCardSearchProvider. 30 // Abstract source of contents for AnswerCardSearchProvider.
33 class AnswerCardContents { 31 class AnswerCardContents {
34 public: 32 public:
35 // Delegate handling contents-related events. 33 // Delegate handling contents-related events.
36 class Delegate { 34 class Delegate {
37 public: 35 public:
38 Delegate() {} 36 Delegate() {}
39 37
40 // Events that the delegate processes. They have same meaning as same-named 38 // Events that the delegate processes. They have same meaning as same-named
41 // events in WebContentsDelegate and WebContentsObserver, however, 39 // events in WebContentsDelegate and WebContentsObserver, however,
42 // unnecessary parameters are omitted. 40 // unnecessary parameters are omitted.
43 virtual void UpdatePreferredSize(const gfx::Size& pref_size) = 0; 41 virtual void UpdatePreferredSize(const gfx::Size& pref_size) = 0;
44 virtual content::WebContents* OpenURLFromTab(
45 const content::OpenURLParams& params) = 0;
46 virtual void DidFinishNavigation( 42 virtual void DidFinishNavigation(
47 content::NavigationHandle* navigation_handle) = 0; 43 content::NavigationHandle* navigation_handle) = 0;
48 virtual void DidStopLoading() = 0; 44 virtual void DidStopLoading() = 0;
49 45
50 private: 46 private:
51 DISALLOW_COPY_AND_ASSIGN(Delegate); 47 DISALLOW_COPY_AND_ASSIGN(Delegate);
52 }; 48 };
53 49
54 AnswerCardContents(); 50 AnswerCardContents();
55 virtual ~AnswerCardContents(); 51 virtual ~AnswerCardContents();
(...skipping 24 matching lines...) Expand all
80 Delegate* delegate_ = nullptr; 76 Delegate* delegate_ = nullptr;
81 // Whether the mouse is in |view()|. 77 // Whether the mouse is in |view()|.
82 bool mouse_is_in_view_ = false; 78 bool mouse_is_in_view_ = false;
83 79
84 DISALLOW_COPY_AND_ASSIGN(AnswerCardContents); 80 DISALLOW_COPY_AND_ASSIGN(AnswerCardContents);
85 }; 81 };
86 82
87 } // namespace app_list 83 } // namespace app_list
88 84
89 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_ANSWER_CARD_ANSWER_CARD_CONTENTS_H_ 85 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_ANSWER_CARD_ANSWER_CARD_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698