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

Side by Side Diff: athena/main/url_search_provider.cc

Issue 596623005: Do not show the activity widget in ActivityManager::AddActivity (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « athena/main/placeholder.cc ('k') | athena/resource_manager/resource_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/main/url_search_provider.h" 5 #include "athena/main/url_search_provider.h"
6 6
7 #include "athena/activity/public/activity.h"
7 #include "athena/activity/public/activity_factory.h" 8 #include "athena/activity/public/activity_factory.h"
8 #include "athena/content/public/scheme_classifier_factory.h" 9 #include "athena/content/public/scheme_classifier_factory.h"
9 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "components/metrics/proto/omnibox_event.pb.h" 12 #include "components/metrics/proto/omnibox_event.pb.h"
12 #include "components/metrics/proto/omnibox_input_type.pb.h" 13 #include "components/metrics/proto/omnibox_input_type.pb.h"
13 #include "components/omnibox/autocomplete_input.h" 14 #include "components/omnibox/autocomplete_input.h"
14 #include "components/omnibox/autocomplete_provider_client.h" 15 #include "components/omnibox/autocomplete_provider_client.h"
15 #include "components/omnibox/search_provider.h" 16 #include "components/omnibox/search_provider.h"
16 #include "components/search_engines/search_terms_data.h" 17 #include "components/search_engines/search_terms_data.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 165
165 UpdateIcon(); 166 UpdateIcon();
166 UpdateTitleAndDetails(); 167 UpdateTitleAndDetails();
167 } 168 }
168 169
169 virtual ~UrlSearchResult() {} 170 virtual ~UrlSearchResult() {}
170 171
171 private: 172 private:
172 // Overriddenn from app_list::SearchResult: 173 // Overriddenn from app_list::SearchResult:
173 virtual void Open(int event_flags) OVERRIDE { 174 virtual void Open(int event_flags) OVERRIDE {
174 ActivityFactory::Get()->CreateWebActivity( 175 Activity* activity = ActivityFactory::Get()->CreateWebActivity(
175 browser_context_, base::string16(), match_.destination_url); 176 browser_context_, base::string16(), match_.destination_url);
177 Activity::Show(activity);
176 } 178 }
177 179
178 void UpdateIcon() { 180 void UpdateIcon() {
179 SetIcon(*ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 181 SetIcon(*ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
180 AutocompleteMatch::TypeToIcon(match_.type))); 182 AutocompleteMatch::TypeToIcon(match_.type)));
181 } 183 }
182 184
183 void UpdateTitleAndDetails() { 185 void UpdateTitleAndDetails() {
184 set_title(match_.contents); 186 set_title(match_.contents);
185 SearchResult::Tags title_tags; 187 SearchResult::Tags title_tags;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 ++it) { 277 ++it) {
276 if (!it->destination_url.is_valid()) 278 if (!it->destination_url.is_valid())
277 continue; 279 continue;
278 280
279 Add(scoped_ptr<app_list::SearchResult>(new UrlSearchResult( 281 Add(scoped_ptr<app_list::SearchResult>(new UrlSearchResult(
280 browser_context_, *it))); 282 browser_context_, *it)));
281 } 283 }
282 } 284 }
283 285
284 } // namespace athena 286 } // namespace athena
OLDNEW
« no previous file with comments | « athena/main/placeholder.cc ('k') | athena/resource_manager/resource_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698