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 <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2497 if (!service_url.is_valid()) { | 2497 if (!service_url.is_valid()) { |
2498 const GURL& url = tab->GetURL(); | 2498 const GURL& url = tab->GetURL(); |
2499 service_url = url.Resolve(href); | 2499 service_url = url.Resolve(href); |
2500 } | 2500 } |
2501 | 2501 |
2502 WebIntentServiceData service; | 2502 WebIntentServiceData service; |
2503 service.service_url = service_url; | 2503 service.service_url = service_url; |
2504 service.action = action; | 2504 service.action = action; |
2505 service.type = type; | 2505 service.type = type; |
2506 service.title = title; | 2506 service.title = title; |
2507 InfoBarTabHelper* infobar_helper = tcw->infobar_tab_helper(); | 2507 RegisterIntentHandlerInfoBarDelegate::MaybeShowIntentInfoBar( |
2508 infobar_helper->AddInfoBar(new RegisterIntentHandlerInfoBarDelegate( | 2508 tcw->infobar_tab_helper(), |
2509 infobar_helper, | |
2510 WebIntentsRegistryFactory::GetForProfile(tcw->profile()), | 2509 WebIntentsRegistryFactory::GetForProfile(tcw->profile()), |
2511 service)); | 2510 service); |
2512 } | 2511 } |
2513 | 2512 |
2514 // static | 2513 // static |
2515 void Browser::FindReplyHelper(TabContents* tab, | 2514 void Browser::FindReplyHelper(TabContents* tab, |
2516 int request_id, | 2515 int request_id, |
2517 int number_of_matches, | 2516 int number_of_matches, |
2518 const gfx::Rect& selection_rect, | 2517 const gfx::Rect& selection_rect, |
2519 int active_match_ordinal, | 2518 int active_match_ordinal, |
2520 bool final_update) { | 2519 bool final_update) { |
2521 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents( | 2520 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents( |
(...skipping 2777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5299 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5298 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5300 } else if (is_type_tabbed()) { | 5299 } else if (is_type_tabbed()) { |
5301 GlobalErrorService* service = | 5300 GlobalErrorService* service = |
5302 GlobalErrorServiceFactory::GetForProfile(profile()); | 5301 GlobalErrorServiceFactory::GetForProfile(profile()); |
5303 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5302 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5304 if (error) { | 5303 if (error) { |
5305 error->ShowBubbleView(this); | 5304 error->ShowBubbleView(this); |
5306 } | 5305 } |
5307 } | 5306 } |
5308 } | 5307 } |
OLD | NEW |