1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "chrome/browser/external_protocol/external_protocol_observer.h" 6 7 #include "chrome/browser/external_protocol/external_protocol_handler.h" 8 9 using content::WebContents; 10 11 DEFINE_WEB_CONTENTS_USER_DATA_KEY(ExternalProtocolObserver); 12 ExternalProtocolObserver(WebContents * web_contents)13ExternalProtocolObserver::ExternalProtocolObserver(WebContents* web_contents) 14 : content::WebContentsObserver(web_contents) { 15 } 16 ~ExternalProtocolObserver()17ExternalProtocolObserver::~ExternalProtocolObserver() { 18 } 19 DidGetUserGesture()20void ExternalProtocolObserver::DidGetUserGesture() { 21 ExternalProtocolHandler::PermitLaunchUrl(); 22 } 23