Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Side by Side Diff: chrome/browser/ui/search/search_model_observer_bridge.h

Issue 10644002: Add core plumbing for Instant Extended work (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address pkasting, tfarina, and remaining nits. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_MODEL_OBSERVER_BRIDGE_H_
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_MODEL_OBSERVER_BRIDGE_H_
7 #pragma once
8
9 #include "chrome/browser/ui/search/search_model.h"
10 #include "chrome/browser/ui/search/search_model_observer.h"
11
12 namespace chrome {
13 namespace search {
14
15 template <class Receiver>
16 class SearchModelObserverBridge : public SearchModelObserver {
17 public:
18 SearchModelObserverBridge(Receiver* receiver, SearchModel* model)
19 : receiver_(receiver),
20 model_(model) {
21 model_->AddObserver(this);
22 }
23
24 ~SearchModelObserverBridge() {
25 model_->RemoveObserver(this);
26 }
27
28 // SearchModelObserver:
29 virtual void ModeChanged(const Mode& mode) OVERRIDE {
30 [receiver_ modeChanged:mode];
31 }
32
33 private:
34 // Weak. Owns us.
35 Receiver* receiver_;
36
37 // Weak.
38 SearchModel* model_;
39
40 DISALLOW_COPY_AND_ASSIGN(SearchModelObserverBridge);
41 };
42
43 } // namespace search
44 } // namespace chrome
45
46 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_MODEL_OBSERVER_BRIDGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_model_observer.h ('k') | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698