OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SEARCH_INSTANT_NTP_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_NTP_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_NTP_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_NTP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 // |on_stale_callback| will be called when |loader_| determines the page to | 30 // |on_stale_callback| will be called when |loader_| determines the page to |
31 // be stale. | 31 // be stale. |
32 void InitContents(Profile* profile, | 32 void InitContents(Profile* profile, |
33 const content::WebContents* active_tab, | 33 const content::WebContents* active_tab, |
34 const base::Closure& on_stale_callback); | 34 const base::Closure& on_stale_callback); |
35 | 35 |
36 // Releases the WebContents for the Instant page. This should be called when | 36 // Releases the WebContents for the Instant page. This should be called when |
37 // the page is about to be committed. | 37 // the page is about to be committed. |
38 scoped_ptr<content::WebContents> ReleaseContents(); | 38 scoped_ptr<content::WebContents> ReleaseContents(); |
39 | 39 |
40 // Used to log each time the user mouses over NTP tiles or titles. | |
41 void LogIframeHover(content::WebContents* contents); | |
Jered
2013/06/28 16:24:17
Using both "IframeHover" and "mouseover" makes it
| |
42 | |
43 // Used to log in UMA the total number of mouseovers over NTP tiles/titles. | |
44 void LogTotalMouseovers(content::WebContents* contents); | |
45 | |
40 private: | 46 private: |
41 // Overriden from InstantLoader::Delegate: | 47 // Overriden from InstantLoader::Delegate: |
42 virtual void OnSwappedContents() OVERRIDE; | 48 virtual void OnSwappedContents() OVERRIDE; |
43 virtual void OnFocus() OVERRIDE; | 49 virtual void OnFocus() OVERRIDE; |
44 virtual void OnMouseDown() OVERRIDE; | 50 virtual void OnMouseDown() OVERRIDE; |
45 virtual void OnMouseUp() OVERRIDE; | 51 virtual void OnMouseUp() OVERRIDE; |
46 virtual content::WebContents* OpenURLFromTab( | 52 virtual content::WebContents* OpenURLFromTab( |
47 content::WebContents* source, | 53 content::WebContents* source, |
48 const content::OpenURLParams& params) OVERRIDE; | 54 const content::OpenURLParams& params) OVERRIDE; |
49 virtual void LoadCompletedMainFrame() OVERRIDE; | 55 virtual void LoadCompletedMainFrame() OVERRIDE; |
50 | 56 |
51 // Overridden from InstantPage: | 57 // Overridden from InstantPage: |
52 virtual bool ShouldProcessRenderViewCreated() OVERRIDE; | 58 virtual bool ShouldProcessRenderViewCreated() OVERRIDE; |
53 virtual bool ShouldProcessRenderViewGone() OVERRIDE; | 59 virtual bool ShouldProcessRenderViewGone() OVERRIDE; |
54 | 60 |
55 InstantLoader loader_; | 61 InstantLoader loader_; |
56 | 62 |
57 DISALLOW_COPY_AND_ASSIGN(InstantNTP); | 63 DISALLOW_COPY_AND_ASSIGN(InstantNTP); |
58 }; | 64 }; |
59 | 65 |
60 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_NTP_H_ | 66 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_NTP_H_ |
OLD | NEW |