OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 // renderer). | 647 // renderer). |
648 view()->RequestFocus(); | 648 view()->RequestFocus(); |
649 #else | 649 #else |
650 // TODO(port) | 650 // TODO(port) |
651 #endif | 651 #endif |
652 } | 652 } |
653 | 653 |
654 void ExtensionHost::TakeFocus(bool reverse) { | 654 void ExtensionHost::TakeFocus(bool reverse) { |
655 } | 655 } |
656 | 656 |
| 657 void ExtensionHost::Activate() { |
| 658 } |
| 659 |
| 660 void ExtensionHost::Deactivate() { |
| 661 } |
| 662 |
657 bool ExtensionHost::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 663 bool ExtensionHost::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
658 bool* is_keyboard_shortcut) { | 664 bool* is_keyboard_shortcut) { |
659 if (extension_host_type_ == ViewType::EXTENSION_POPUP && | 665 if (extension_host_type_ == ViewType::EXTENSION_POPUP && |
660 event.type == NativeWebKeyboardEvent::RawKeyDown && | 666 event.type == NativeWebKeyboardEvent::RawKeyDown && |
661 event.windowsKeyCode == base::VKEY_ESCAPE) { | 667 event.windowsKeyCode == base::VKEY_ESCAPE) { |
662 DCHECK(is_keyboard_shortcut != NULL); | 668 DCHECK(is_keyboard_shortcut != NULL); |
663 *is_keyboard_shortcut = true; | 669 *is_keyboard_shortcut = true; |
664 } | 670 } |
665 return false; | 671 return false; |
666 } | 672 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 // Extensions hosted in ExternalTabContainer objects may not have | 748 // Extensions hosted in ExternalTabContainer objects may not have |
743 // an associated browser. | 749 // an associated browser. |
744 Browser* browser = GetBrowser(); | 750 Browser* browser = GetBrowser(); |
745 if (browser) | 751 if (browser) |
746 window_id = ExtensionTabUtil::GetWindowId(browser); | 752 window_id = ExtensionTabUtil::GetWindowId(browser); |
747 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { | 753 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { |
748 NOTREACHED(); | 754 NOTREACHED(); |
749 } | 755 } |
750 return window_id; | 756 return window_id; |
751 } | 757 } |
OLD | NEW |