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

Side by Side Diff: chrome/browser/ui/views/ash/app_list/search_builder.cc

Issue 10694060: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
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 #include "chrome/browser/ui/views/ash/app_list/search_builder.h" 5 #include "chrome/browser/ui/views/ash/app_list/search_builder.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 static_cast<const SearchBuilderResult*>(&result); 231 static_cast<const SearchBuilderResult*>(&result);
232 const AutocompleteMatch& match = builder_result->match(); 232 const AutocompleteMatch& match = builder_result->match();
233 233
234 if (match.type == AutocompleteMatch::EXTENSION_APP) { 234 if (match.type == AutocompleteMatch::EXTENSION_APP) {
235 const extensions::Extension* extension = 235 const extensions::Extension* extension =
236 GetExtensionByURL(profile_, match.destination_url); 236 GetExtensionByURL(profile_, match.destination_url);
237 if (extension) 237 if (extension)
238 extension_utils::OpenExtension(profile_, extension, event_flags); 238 extension_utils::OpenExtension(profile_, extension, event_flags);
239 } else { 239 } else {
240 WindowOpenDisposition disposition = 240 WindowOpenDisposition disposition =
241 browser::DispositionFromEventFlags(event_flags); 241 chrome::DispositionFromEventFlags(event_flags);
242 Browser* browser = browser::FindOrCreateTabbedBrowser(profile_); 242 Browser* browser = browser::FindOrCreateTabbedBrowser(profile_);
243 243
244 if (disposition == CURRENT_TAB) { 244 if (disposition == CURRENT_TAB) {
245 // If current tab is not NTP, change disposition to NEW_FOREGROUND_TAB. 245 // If current tab is not NTP, change disposition to NEW_FOREGROUND_TAB.
246 const GURL& url = chrome::GetActiveWebContents(browser) ? 246 const GURL& url = chrome::GetActiveWebContents(browser) ?
247 chrome::GetActiveWebContents(browser)->GetURL() : GURL(); 247 chrome::GetActiveWebContents(browser)->GetURL() : GURL();
248 if (!url.SchemeIs(chrome::kChromeUIScheme) || 248 if (!url.SchemeIs(chrome::kChromeUIScheme) ||
249 url.host() != chrome::kChromeUINewTabHost) { 249 url.host() != chrome::kChromeUINewTabHost) {
250 disposition = NEW_FOREGROUND_TAB; 250 disposition = NEW_FOREGROUND_TAB;
251 } 251 }
(...skipping 16 matching lines...) Expand all
268 ++it) { 268 ++it) {
269 results_->Add(new SearchBuilderResult(profile_, *it)); 269 results_->Add(new SearchBuilderResult(profile_, *it));
270 } 270 }
271 } 271 }
272 272
273 void SearchBuilder::OnResultChanged(bool default_match_changed) { 273 void SearchBuilder::OnResultChanged(bool default_match_changed) {
274 // TODO(xiyuan): Handle default match properly. 274 // TODO(xiyuan): Handle default match properly.
275 const AutocompleteResult& ac_result = controller_->result(); 275 const AutocompleteResult& ac_result = controller_->result();
276 PopulateFromACResult(ac_result); 276 PopulateFromACResult(ac_result);
277 } 277 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/accessibility/invert_bubble_view.cc ('k') | chrome/browser/ui/views/ash/extension_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698