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

Side by Side Diff: content/renderer/external_popup_menu.cc

Issue 1992393002: Enable external popup menu in Blimp, part 1/2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/external_popup_menu.h" 5 #include "content/renderer/external_popup_menu.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/common/frame_messages.h" 10 #include "content/common/frame_messages.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void ExternalPopupMenu::DidSelectItem(int index) { 67 void ExternalPopupMenu::DidSelectItem(int index) {
68 if (!popup_menu_client_) 68 if (!popup_menu_client_)
69 return; 69 return;
70 if (index == -1) 70 if (index == -1)
71 popup_menu_client_->didCancel(); 71 popup_menu_client_->didCancel();
72 else 72 else
73 popup_menu_client_->didAcceptIndex(index); 73 popup_menu_client_->didAcceptIndex(index);
74 } 74 }
75 #endif 75 #endif
76 76
77 #if defined(OS_ANDROID) 77 #if defined(USE_EXTERNAL_POPUP_MENU) && !defined(OS_MACOSX)
78 void ExternalPopupMenu::DidSelectItems(bool canceled, 78 void ExternalPopupMenu::DidSelectItems(bool canceled,
79 const std::vector<int>& indices) { 79 const std::vector<int>& indices) {
80 if (!popup_menu_client_) 80 if (!popup_menu_client_)
81 return; 81 return;
82 if (canceled) 82 if (canceled)
83 popup_menu_client_->didCancel(); 83 popup_menu_client_->didCancel();
84 else 84 else
85 popup_menu_client_->didAcceptIndices(indices); 85 popup_menu_client_->didAcceptIndices(indices);
86 } 86 }
87 #endif 87 #endif
88 88
89 } // namespace content 89 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698