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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 8144013: Add a check to the registry before the intent infobar is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 9 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 | Annotate | Revision Log
OLDNEW
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 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 if (!service_url.is_valid()) { 2486 if (!service_url.is_valid()) {
2487 const GURL& url = tab->GetURL(); 2487 const GURL& url = tab->GetURL();
2488 service_url = url.Resolve(href); 2488 service_url = url.Resolve(href);
2489 } 2489 }
2490 2490
2491 WebIntentServiceData service; 2491 WebIntentServiceData service;
2492 service.service_url = service_url; 2492 service.service_url = service_url;
2493 service.action = action; 2493 service.action = action;
2494 service.type = type; 2494 service.type = type;
2495 service.title = title; 2495 service.title = title;
2496 InfoBarTabHelper* infobar_helper = tcw->infobar_tab_helper(); 2496 RegisterIntentHandlerInfoBarDelegate::MaybeShowIntentInfoBar(
2497 infobar_helper->AddInfoBar(new RegisterIntentHandlerInfoBarDelegate( 2497 tcw->infobar_tab_helper(),
2498 infobar_helper,
2499 WebIntentsRegistryFactory::GetForProfile(tcw->profile()), 2498 WebIntentsRegistryFactory::GetForProfile(tcw->profile()),
2500 service)); 2499 service);
2501 } 2500 }
2502 2501
2503 // static 2502 // static
2504 void Browser::FindReplyHelper(TabContents* tab, 2503 void Browser::FindReplyHelper(TabContents* tab,
2505 int request_id, 2504 int request_id,
2506 int number_of_matches, 2505 int number_of_matches,
2507 const gfx::Rect& selection_rect, 2506 const gfx::Rect& selection_rect,
2508 int active_match_ordinal, 2507 int active_match_ordinal,
2509 bool final_update) { 2508 bool final_update) {
2510 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents( 2509 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
(...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
5303 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5302 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5304 } else if (is_type_tabbed()) { 5303 } else if (is_type_tabbed()) {
5305 GlobalErrorService* service = 5304 GlobalErrorService* service =
5306 GlobalErrorServiceFactory::GetForProfile(profile()); 5305 GlobalErrorServiceFactory::GetForProfile(profile());
5307 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5306 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5308 if (error) { 5307 if (error) {
5309 error->ShowBubbleView(this); 5308 error->ShowBubbleView(this);
5310 } 5309 }
5311 } 5310 }
5312 } 5311 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698