| 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 // Stores per-profile state needed for find in page. This includes the most | 5 // Stores per-profile state needed for find in page. This includes the most |
| 6 // recently searched for term. | 6 // recently searched for term. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_ | 8 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_ |
| 9 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_ | 9 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_ |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 13 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
| 14 | 14 |
| 15 class Profile; | 15 class Profile; |
| 16 | 16 |
| 17 class FindBarState : public ProfileKeyedService { | 17 class FindBarState : public BrowserContextKeyedService { |
| 18 public: | 18 public: |
| 19 FindBarState() {} | 19 FindBarState() {} |
| 20 virtual ~FindBarState() {} | 20 virtual ~FindBarState() {} |
| 21 | 21 |
| 22 string16 last_prepopulate_text() const { | 22 string16 last_prepopulate_text() const { |
| 23 return last_prepopulate_text_; | 23 return last_prepopulate_text_; |
| 24 } | 24 } |
| 25 | 25 |
| 26 void set_last_prepopulate_text(const string16& text) { | 26 void set_last_prepopulate_text(const string16& text) { |
| 27 last_prepopulate_text_ = text; | 27 last_prepopulate_text_ = text; |
| 28 } | 28 } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 string16 last_prepopulate_text_; | 31 string16 last_prepopulate_text_; |
| 32 | 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(FindBarState); | 33 DISALLOW_COPY_AND_ASSIGN(FindBarState); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_ | 36 #endif // CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_ |
| OLD | NEW |