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

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

Issue 9536023: Revert 124228 - Revert 119423 - Revert 119306 - Turn web intents build flag on. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 9 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) 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/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 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 } 2697 }
2698 } 2698 }
2699 2699
2700 // static 2700 // static
2701 void Browser::RegisterIntentHandlerHelper(WebContents* tab, 2701 void Browser::RegisterIntentHandlerHelper(WebContents* tab,
2702 const string16& action, 2702 const string16& action,
2703 const string16& type, 2703 const string16& type,
2704 const string16& href, 2704 const string16& href,
2705 const string16& title, 2705 const string16& title,
2706 const string16& disposition) { 2706 const string16& disposition) {
2707 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) 2707 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableWebIntents))
2708 return; 2708 return;
2709 2709
2710 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents( 2710 TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
2711 tab); 2711 tab);
2712 if (!tcw || tcw->profile()->IsOffTheRecord()) 2712 if (!tcw || tcw->profile()->IsOffTheRecord())
2713 return; 2713 return;
2714 2714
2715 FaviconService* favicon_service = 2715 FaviconService* favicon_service =
2716 tcw->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS); 2716 tcw->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS);
2717 2717
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
4037 const string16& action, 4037 const string16& action,
4038 const string16& type, 4038 const string16& type,
4039 const string16& href, 4039 const string16& href,
4040 const string16& title, 4040 const string16& title,
4041 const string16& disposition) { 4041 const string16& disposition) {
4042 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); 4042 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition);
4043 } 4043 }
4044 4044
4045 void Browser::WebIntentDispatch( 4045 void Browser::WebIntentDispatch(
4046 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) { 4046 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) {
4047 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) 4047 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableWebIntents))
4048 return; 4048 return;
4049 4049
4050 TabContentsWrapper* tcw = 4050 TabContentsWrapper* tcw =
4051 TabContentsWrapper::GetCurrentWrapperForContents(tab); 4051 TabContentsWrapper::GetCurrentWrapperForContents(tab);
4052 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher); 4052 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher);
4053 tcw->web_intent_picker_controller()->ShowDialog( 4053 tcw->web_intent_picker_controller()->ShowDialog(
4054 this, 4054 this,
4055 intents_dispatcher->GetIntent().action, 4055 intents_dispatcher->GetIntent().action,
4056 intents_dispatcher->GetIntent().type); 4056 intents_dispatcher->GetIntent().type);
4057 } 4057 }
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
5485 profile()->GetOriginalProfile()); 5485 profile()->GetOriginalProfile());
5486 if (service->HasSyncSetupCompleted()) 5486 if (service->HasSyncSetupCompleted())
5487 ShowOptionsTab(chrome::kPersonalOptionsSubPage); 5487 ShowOptionsTab(chrome::kPersonalOptionsSubPage);
5488 else 5488 else
5489 service->ShowLoginDialog(); 5489 service->ShowLoginDialog();
5490 } 5490 }
5491 5491
5492 void Browser::ToggleSpeechInput() { 5492 void Browser::ToggleSpeechInput() {
5493 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); 5493 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput();
5494 } 5494 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/options_bundle.js ('k') | chrome/browser/ui/webui/options/content_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698