Chromium Code Reviews| Index: chrome/browser/search/one_google_bar/one_google_bar_service_observer.h |
| diff --git a/chrome/browser/search/one_google_bar/one_google_bar_service_observer.h b/chrome/browser/search/one_google_bar/one_google_bar_service_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c3327ee5f404ea54bd5a210c44a5d26135e92963 |
| --- /dev/null |
| +++ b/chrome/browser/search/one_google_bar/one_google_bar_service_observer.h |
| @@ -0,0 +1,20 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_OBSERVER_H_ |
| +#define CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_OBSERVER_H_ |
| + |
| +#include "base/optional.h" |
| + |
| +struct OneGoogleBarData; |
| + |
| +// Observer for OneGoogleBarService. Gets notified when the OneGoogleBarData |
| +// changes. |
| +class OneGoogleBarServiceObserver { |
| + public: |
| + virtual void OnOneGoogleBarDataChanged( |
| + const base::Optional<OneGoogleBarData>& data) = 0; |
|
sfiera
2017/04/13 15:18:31
Since the service provides an accessor, I would be
Marc Treib
2017/04/13 15:44:02
Hm. I do like the idea of "one way to get the valu
sfiera
2017/04/13 15:58:33
Passing nothing would be a lot less convenient, si
Marc Treib
2017/04/13 16:45:15
Eeh, in my experience most observers need to keep
|
| +}; |
| + |
| +#endif // CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_OBSERVER_H_ |