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

Side by Side Diff: chrome/browser/renderer_context_menu/open_with_menu_factory_ash.cc

Issue 1760773004: Add "Open with <ARC-app-name>" items to the context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a missing override; Created 4 years, 8 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
OLDNEW
(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 "chrome/browser/renderer_context_menu/open_with_menu_factory.h"
6
7 #include "ash/renderer_context_menu/open_with_menu_controller.h"
8 #include "ash/shell.h"
9
10 namespace {
11
12 ash::OpenWithMenuController* GetController() {
13 if (!ash::Shell::HasInstance())
14 return nullptr;
15 return ash::Shell::GetInstance()->open_with_menu_controller();
16 }
17
18 } // namespace
19
20 RenderViewContextMenuObserver* OpenWithMenuFactory::CreateMenu(
21 RenderViewContextMenuProxy* proxy,
22 int menu_id_start,
23 size_t num_menu_items,
24 int sub_menu_id_start,
25 size_t num_sub_menu_items) {
26 ash::OpenWithMenuController* controller = GetController();
27 if (!controller)
28 return nullptr;
29 return controller->CreateMenu(proxy, menu_id_start, num_menu_items,
30 sub_menu_id_start, num_sub_menu_items);
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698