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

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

Issue 7930002: Rename WebIntentData for backend storage to WebIntentServiceData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix class/struct decl Created 9 years, 3 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/intents/web_intent_picker_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 #include "grit/locale_settings.h" 149 #include "grit/locale_settings.h"
150 #include "grit/theme_resources_standard.h" 150 #include "grit/theme_resources_standard.h"
151 #include "net/base/cookie_monster.h" 151 #include "net/base/cookie_monster.h"
152 #include "net/base/net_util.h" 152 #include "net/base/net_util.h"
153 #include "net/base/registry_controlled_domain.h" 153 #include "net/base/registry_controlled_domain.h"
154 #include "net/url_request/url_request_context.h" 154 #include "net/url_request/url_request_context.h"
155 #include "ui/base/animation/animation.h" 155 #include "ui/base/animation/animation.h"
156 #include "ui/base/l10n/l10n_util.h" 156 #include "ui/base/l10n/l10n_util.h"
157 #include "ui/gfx/point.h" 157 #include "ui/gfx/point.h"
158 #include "webkit/glue/webkit_glue.h" 158 #include "webkit/glue/webkit_glue.h"
159 #include "webkit/glue/web_intent_data.h"
159 #include "webkit/glue/window_open_disposition.h" 160 #include "webkit/glue/window_open_disposition.h"
160 161
161 #if defined(OS_WIN) 162 #if defined(OS_WIN)
162 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h" 163 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h"
163 #include "chrome/browser/shell_integration.h" 164 #include "chrome/browser/shell_integration.h"
164 #include "chrome/browser/ssl/ssl_error_info.h" 165 #include "chrome/browser/ssl/ssl_error_info.h"
165 #include "chrome/browser/task_manager/task_manager.h" 166 #include "chrome/browser/task_manager/task_manager.h"
166 #include "chrome/browser/ui/view_ids.h" 167 #include "chrome/browser/ui/view_ids.h"
167 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 168 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
168 #include "ui/base/win/shell.h" 169 #include "ui/base/win/shell.h"
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 2479
2479 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) 2480 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents))
2480 return; 2481 return;
2481 2482
2482 GURL service_url(href); 2483 GURL service_url(href);
2483 if (!service_url.is_valid()) { 2484 if (!service_url.is_valid()) {
2484 const GURL& url = tab->GetURL(); 2485 const GURL& url = tab->GetURL();
2485 service_url = url.Resolve(href); 2486 service_url = url.Resolve(href);
2486 } 2487 }
2487 2488
2488 WebIntentData intent; 2489 WebIntentServiceData service;
2489 intent.service_url = service_url; 2490 service.service_url = service_url;
2490 intent.action = action; 2491 service.action = action;
2491 intent.type = type; 2492 service.type = type;
2492 intent.title = title; 2493 service.title = title;
2493 tcw->infobar_tab_helper()->AddInfoBar( 2494 tcw->infobar_tab_helper()->AddInfoBar(
2494 new RegisterIntentHandlerInfoBarDelegate(tab, intent)); 2495 new RegisterIntentHandlerInfoBarDelegate(tab, service));
2495 } 2496 }
2496 2497
2497 // static 2498 // static
2498 void Browser::FindReplyHelper(TabContents* tab, 2499 void Browser::FindReplyHelper(TabContents* tab,
2499 int request_id, 2500 int request_id,
2500 int number_of_matches, 2501 int number_of_matches,
2501 const gfx::Rect& selection_rect, 2502 const gfx::Rect& selection_rect,
2502 int active_match_ordinal, 2503 int active_match_ordinal,
2503 bool final_update) { 2504 bool final_update) {
2504 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents( 2505 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
3827 void Browser::RegisterIntentHandler(TabContents* tab, 3828 void Browser::RegisterIntentHandler(TabContents* tab,
3828 const string16& action, 3829 const string16& action,
3829 const string16& type, 3830 const string16& type,
3830 const string16& href, 3831 const string16& href,
3831 const string16& title) { 3832 const string16& title) {
3832 RegisterIntentHandlerHelper(tab, action, type, href, title); 3833 RegisterIntentHandlerHelper(tab, action, type, href, title);
3833 } 3834 }
3834 3835
3835 void Browser::WebIntentDispatch(TabContents* tab, 3836 void Browser::WebIntentDispatch(TabContents* tab,
3836 int routing_id, 3837 int routing_id,
3837 const string16& action, 3838 const webkit_glue::WebIntentData& intent,
3838 const string16& type,
3839 const string16& data,
3840 int intent_id) { 3839 int intent_id) {
3841 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) 3840 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents))
3842 return; 3841 return;
3843 3842
3844 TabContentsWrapper* tcw = 3843 TabContentsWrapper* tcw =
3845 TabContentsWrapper::GetCurrentWrapperForContents(tab); 3844 TabContentsWrapper::GetCurrentWrapperForContents(tab);
3846 3845
3847 tcw->web_intent_picker_controller()->ShowDialog(window()->GetNativeHandle(), 3846 tcw->web_intent_picker_controller()->ShowDialog(window()->GetNativeHandle(),
3848 action, type); 3847 intent.action, intent.type);
3849 } 3848 }
3850 3849
3851 void Browser::FindReply(TabContents* tab, 3850 void Browser::FindReply(TabContents* tab,
3852 int request_id, 3851 int request_id,
3853 int number_of_matches, 3852 int number_of_matches,
3854 const gfx::Rect& selection_rect, 3853 const gfx::Rect& selection_rect,
3855 int active_match_ordinal, 3854 int active_match_ordinal,
3856 bool final_update) { 3855 bool final_update) {
3857 FindReplyHelper(tab, request_id, number_of_matches, selection_rect, 3856 FindReplyHelper(tab, request_id, number_of_matches, selection_rect,
3858 active_match_ordinal, final_update); 3857 active_match_ordinal, final_update);
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
5273 } else if (is_type_tabbed()) { 5272 } else if (is_type_tabbed()) {
5274 GlobalErrorService* service = 5273 GlobalErrorService* service =
5275 GlobalErrorServiceFactory::GetForProfile(profile()); 5274 GlobalErrorServiceFactory::GetForProfile(profile());
5276 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5275 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5277 if (error) { 5276 if (error) {
5278 error->ShowBubbleView(this); 5277 error->ShowBubbleView(this);
5279 did_show_bubble = true; 5278 did_show_bubble = true;
5280 } 5279 }
5281 } 5280 }
5282 } 5281 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/intents/web_intent_picker_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698