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

Side by Side Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 55433002: Propagates the search result of start page to the app-list search box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: observer Created 7 years, 1 month 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/ui/app_list/start_page_service.h" 5 #include "chrome/browser/ui/app_list/start_page_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 contents_->GetController().LoadURL( 132 contents_->GetController().LoadURL(
133 url, 133 url,
134 content::Referrer(), 134 content::Referrer(),
135 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 135 content::PAGE_TRANSITION_AUTO_TOPLEVEL,
136 std::string()); 136 std::string());
137 } 137 }
138 138
139 StartPageService::~StartPageService() {} 139 StartPageService::~StartPageService() {}
140 140
141 void StartPageService::AddObserver(StartPageObserver* observer) {
142 observers_.AddObserver(observer);
143 }
144
145 void StartPageService::RemoveObserver(StartPageObserver* observer) {
146 observers_.RemoveObserver(observer);
147 }
148
149 void StartPageService::OnSearch(const base::string16& query) {
150 FOR_EACH_OBSERVER(StartPageObserver, observers_, OnSearch(query));
151 }
152
141 void StartPageService::Shutdown() { 153 void StartPageService::Shutdown() {
142 contents_.reset(); 154 contents_.reset();
143 } 155 }
144 156
145 } // namespace app_list 157 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698