| Index: ash/renderer_context_menu/open_with_menu_controller.cc
|
| diff --git a/ash/renderer_context_menu/open_with_menu_controller.cc b/ash/renderer_context_menu/open_with_menu_controller.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4333c754b3e81ce91c82359e5669b2db9b66eef1
|
| --- /dev/null
|
| +++ b/ash/renderer_context_menu/open_with_menu_controller.cc
|
| @@ -0,0 +1,25 @@
|
| +// 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.
|
| +
|
| +#include "ash/renderer_context_menu/open_with_menu_controller.h"
|
| +
|
| +#include "ash/renderer_context_menu/link_handler_model.h"
|
| +#include "ui/base/models/menu_model.h"
|
| +
|
| +namespace ash {
|
| +
|
| +OpenWithMenuController::OpenWithMenuController() : delegate_(nullptr) {}
|
| +
|
| +void OpenWithMenuController::SetDelegate(Delegate* delegate) {
|
| + delegate_ = delegate;
|
| +}
|
| +
|
| +std::unique_ptr<LinkHandlerModel> OpenWithMenuController::CreateModel(
|
| + const GURL& url) {
|
| + if (!delegate_)
|
| + return nullptr;
|
| + return delegate_->CreateModel(url);
|
| +}
|
| +
|
| +} // namespace ash
|
|
|