| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBUI_NTP_NEW_TAB_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // The current preference version. | 54 // The current preference version. |
| 55 static int current_pref_version() { return current_pref_version_; } | 55 static int current_pref_version() { return current_pref_version_; } |
| 56 | 56 |
| 57 // WebUIController implementation: | 57 // WebUIController implementation: |
| 58 virtual void RenderViewCreated( | 58 virtual void RenderViewCreated( |
| 59 content::RenderViewHost* render_view_host) OVERRIDE; | 59 content::RenderViewHost* render_view_host) OVERRIDE; |
| 60 virtual void RenderViewReused( | 60 virtual void RenderViewReused( |
| 61 content::RenderViewHost* render_view_host) OVERRIDE; | 61 content::RenderViewHost* render_view_host) OVERRIDE; |
| 62 | 62 |
| 63 // Returns true if the bookmark bar can be displayed over this webui, detached | |
| 64 // from the location bar. | |
| 65 bool CanShowBookmarkBar() const; | |
| 66 | |
| 67 bool showing_sync_bubble() { return showing_sync_bubble_; } | 63 bool showing_sync_bubble() { return showing_sync_bubble_; } |
| 68 void set_showing_sync_bubble(bool showing) { showing_sync_bubble_ = showing; } | 64 void set_showing_sync_bubble(bool showing) { showing_sync_bubble_ = showing; } |
| 69 | 65 |
| 70 class NewTabHTMLSource : public content::URLDataSource { | 66 class NewTabHTMLSource : public content::URLDataSource { |
| 71 public: | 67 public: |
| 72 explicit NewTabHTMLSource(Profile* profile); | 68 explicit NewTabHTMLSource(Profile* profile); |
| 73 | 69 |
| 74 // content::URLDataSource implementation. | 70 // content::URLDataSource implementation. |
| 75 virtual std::string GetSource() OVERRIDE; | 71 virtual std::string GetSource() OVERRIDE; |
| 76 virtual void StartDataRequest( | 72 virtual void StartDataRequest( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 127 |
| 132 // If the sync promo NTP bubble is being shown. | 128 // If the sync promo NTP bubble is being shown. |
| 133 bool showing_sync_bubble_; | 129 bool showing_sync_bubble_; |
| 134 | 130 |
| 135 PrefChangeRegistrar pref_change_registrar_; | 131 PrefChangeRegistrar pref_change_registrar_; |
| 136 | 132 |
| 137 DISALLOW_COPY_AND_ASSIGN(NewTabUI); | 133 DISALLOW_COPY_AND_ASSIGN(NewTabUI); |
| 138 }; | 134 }; |
| 139 | 135 |
| 140 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ | 136 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_UI_H_ |
| OLD | NEW |