| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 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/search/instant_extended_context_menu_observer.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "chrome/app/chrome_command_ids.h" | |
| 9 #include "chrome/browser/search/search.h" | |
| 10 | |
| 11 InstantExtendedContextMenuObserver::InstantExtendedContextMenuObserver( | |
| 12 content::WebContents* contents) | |
| 13 : is_instant_overlay_(chrome::IsInstantOverlay(contents)) { | |
| 14 } | |
| 15 | |
| 16 InstantExtendedContextMenuObserver::~InstantExtendedContextMenuObserver() { | |
| 17 } | |
| 18 | |
| 19 bool InstantExtendedContextMenuObserver::IsCommandIdSupported(int command_id) { | |
| 20 switch (command_id) { | |
| 21 case IDC_BACK: | |
| 22 case IDC_FORWARD: | |
| 23 case IDC_PRINT: | |
| 24 case IDC_RELOAD: | |
| 25 return is_instant_overlay_; | |
| 26 default: | |
| 27 return false; | |
| 28 } | |
| 29 } | |
| 30 | |
| 31 bool InstantExtendedContextMenuObserver::IsCommandIdEnabled(int command_id) { | |
| 32 DCHECK(IsCommandIdSupported(command_id)); | |
| 33 return false; | |
| 34 } | |
| OLD | NEW |