OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 "ash/renderer_context_menu/open_with_menu_controller.h" |
| 6 |
| 7 #include "ash/renderer_context_menu/link_handler_model.h" |
| 8 #include "ui/base/models/menu_model.h" |
| 9 |
| 10 namespace ash { |
| 11 |
| 12 OpenWithMenuController::OpenWithMenuController() : delegate_(nullptr) {} |
| 13 |
| 14 void OpenWithMenuController::SetDelegate(Delegate* delegate) { |
| 15 delegate_ = delegate; |
| 16 } |
| 17 |
| 18 std::unique_ptr<LinkHandlerModel> OpenWithMenuController::CreateModel( |
| 19 const GURL& url) { |
| 20 if (!delegate_) |
| 21 return nullptr; |
| 22 return delegate_->CreateModel(url); |
| 23 } |
| 24 |
| 25 } // namespace ash |
OLD | NEW |