OLD | NEW |
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/frame/browser_frame_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 request_url = GURL(url); | 458 request_url = GURL(url); |
459 } else if (l_param) { | 459 } else if (l_param) { |
460 const wchar_t* search_string = | 460 const wchar_t* search_string = |
461 reinterpret_cast<const wchar_t*>(l_param); | 461 reinterpret_cast<const wchar_t*>(l_param); |
462 const TemplateURL* default_provider = | 462 const TemplateURL* default_provider = |
463 TemplateURLServiceFactory::GetForProfile(browser->profile())-> | 463 TemplateURLServiceFactory::GetForProfile(browser->profile())-> |
464 GetDefaultSearchProvider(); | 464 GetDefaultSearchProvider(); |
465 if (default_provider) { | 465 if (default_provider) { |
466 const TemplateURLRef& search_url = default_provider->url_ref(); | 466 const TemplateURLRef& search_url = default_provider->url_ref(); |
467 DCHECK(search_url.SupportsReplacement()); | 467 DCHECK(search_url.SupportsReplacement()); |
468 request_url = GURL(search_url.ReplaceSearchTerms(search_string, | 468 request_url = GURL(search_url.ReplaceSearchTerms( |
469 TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, | 469 TemplateURLRef::SearchTermsArgs(search_string))); |
470 string16())); | |
471 } | 470 } |
472 } | 471 } |
473 if (request_url.is_valid()) { | 472 if (request_url.is_valid()) { |
474 browser->OpenURL(OpenURLParams(request_url, Referrer(), NEW_FOREGROUND_TAB, | 473 browser->OpenURL(OpenURLParams(request_url, Referrer(), NEW_FOREGROUND_TAB, |
475 content::PAGE_TRANSITION_TYPED, false)); | 474 content::PAGE_TRANSITION_TYPED, false)); |
476 } | 475 } |
477 } | 476 } |
478 | 477 |
479 void BrowserFrameWin::GetMetroCurrentTabInfo(WPARAM w_param) { | 478 void BrowserFrameWin::GetMetroCurrentTabInfo(WPARAM w_param) { |
480 if (!base::win::GetMetroModule()) { | 479 if (!base::win::GetMetroModule()) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 517 |
519 //////////////////////////////////////////////////////////////////////////////// | 518 //////////////////////////////////////////////////////////////////////////////// |
520 // NativeBrowserFrame, public: | 519 // NativeBrowserFrame, public: |
521 | 520 |
522 // static | 521 // static |
523 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 522 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
524 BrowserFrame* browser_frame, | 523 BrowserFrame* browser_frame, |
525 BrowserView* browser_view) { | 524 BrowserView* browser_view) { |
526 return new BrowserFrameWin(browser_frame, browser_view); | 525 return new BrowserFrameWin(browser_frame, browser_view); |
527 } | 526 } |
OLD | NEW |