| 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_FIND_BAR_FIND_BAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
| 11 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
| 12 | 13 |
| 13 class FindBar; | 14 class FindBar; |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 class WebContents; | 17 class WebContents; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 83 |
| 83 // For Windows and Linux this function sets the prepopulate text for the | 84 // For Windows and Linux this function sets the prepopulate text for the |
| 84 // Find text box. The propopulate value is the last value the user searched | 85 // Find text box. The propopulate value is the last value the user searched |
| 85 // for in the current tab, or (if blank) the last value searched for in any | 86 // for in the current tab, or (if blank) the last value searched for in any |
| 86 // tab. Mac has a global value for search, so this function does nothing on | 87 // tab. Mac has a global value for search, so this function does nothing on |
| 87 // Mac. | 88 // Mac. |
| 88 void MaybeSetPrepopulateText(); | 89 void MaybeSetPrepopulateText(); |
| 89 | 90 |
| 90 content::NotificationRegistrar registrar_; | 91 content::NotificationRegistrar registrar_; |
| 91 | 92 |
| 92 scoped_ptr<FindBar> find_bar_; | 93 std::unique_ptr<FindBar> find_bar_; |
| 93 | 94 |
| 94 // The WebContents we are currently associated with. Can be NULL. | 95 // The WebContents we are currently associated with. Can be NULL. |
| 95 content::WebContents* web_contents_; | 96 content::WebContents* web_contents_; |
| 96 | 97 |
| 97 // The last match count we reported to the user. This is used by | 98 // The last match count we reported to the user. This is used by |
| 98 // UpdateFindBarForCurrentResult to avoid flickering. | 99 // UpdateFindBarForCurrentResult to avoid flickering. |
| 99 int last_reported_matchcount_; | 100 int last_reported_matchcount_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(FindBarController); | 102 DISALLOW_COPY_AND_ASSIGN(FindBarController); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ | 105 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_ |
| OLD | NEW |