OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3515 | 3515 |
3516 GURL url = preview_contents->tab_contents()->GetURL(); | 3516 GURL url = preview_contents->tab_contents()->GetURL(); |
3517 DCHECK(profile_->GetExtensionService()); | 3517 DCHECK(profile_->GetExtensionService()); |
3518 if (profile_->GetExtensionService()->IsInstalledApp(url)) { | 3518 if (profile_->GetExtensionService()->IsInstalledApp(url)) { |
3519 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, | 3519 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, |
3520 extension_misc::APP_LAUNCH_OMNIBOX_INSTANT, | 3520 extension_misc::APP_LAUNCH_OMNIBOX_INSTANT, |
3521 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); | 3521 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); |
3522 } | 3522 } |
3523 } | 3523 } |
3524 | 3524 |
3525 void Browser::SetSuggestedText(const string16& text) { | 3525 void Browser::SetSuggestedText(const string16& text, |
3526 window()->GetLocationBar()->SetSuggestedText(text); | 3526 InstantCompleteBehavior behavior) { |
| 3527 window()->GetLocationBar()->SetSuggestedText(text, behavior); |
3527 } | 3528 } |
3528 | 3529 |
3529 gfx::Rect Browser::GetInstantBounds() { | 3530 gfx::Rect Browser::GetInstantBounds() { |
3530 return window()->GetInstantBounds(); | 3531 return window()->GetInstantBounds(); |
3531 } | 3532 } |
3532 | 3533 |
3533 /////////////////////////////////////////////////////////////////////////////// | 3534 /////////////////////////////////////////////////////////////////////////////// |
3534 // Browser, Command and state updating (private): | 3535 // Browser, Command and state updating (private): |
3535 | 3536 |
3536 void Browser::InitCommandState() { | 3537 void Browser::InitCommandState() { |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4396 // The page transition below is only for the purpose of inserting the tab. | 4397 // The page transition below is only for the purpose of inserting the tab. |
4397 browser->AddTab(view_source_contents, PageTransition::LINK); | 4398 browser->AddTab(view_source_contents, PageTransition::LINK); |
4398 } | 4399 } |
4399 | 4400 |
4400 if (profile_->HasSessionService()) { | 4401 if (profile_->HasSessionService()) { |
4401 SessionService* session_service = profile_->GetSessionService(); | 4402 SessionService* session_service = profile_->GetSessionService(); |
4402 if (session_service) | 4403 if (session_service) |
4403 session_service->TabRestored(&view_source_contents->controller(), false); | 4404 session_service->TabRestored(&view_source_contents->controller(), false); |
4404 } | 4405 } |
4405 } | 4406 } |
OLD | NEW |