blob: 48c40ef31347d2be6d5b1003859739c68e6431fa [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <UIKit/UIKit.h>
#include "base/strings/string16.h"
#include "ios/web/public/navigation/referrer.h"
#include "url/gurl.h"
namespace web {
// Wraps information needed to show a context menu.
struct ContextMenuParams {
ContextMenuParams(const ContextMenuParams& other);
// The title of the menu.
NSString* menu_title;
// The URL of the link that encloses the node the context menu was invoked on.
GURL link_url;
// The source URL of the element the context menu was invoked on. Example of
// elements with source URLs are img, audio, and video.
GURL src_url;
// The referrer policy to use when opening the link.
web::ReferrerPolicy referrer_policy;
// The view in which to present the menu.
UIView* view;
// The location in |view| to present the menu.
CGPoint location;
// The text associated with the link. It is either nil or nonempty (it can not
// be empty).
NSString* link_text;
} // namespace web