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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1505723005: Null-check GetView before using it in GetFocusedRenderWidgetHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop the event instead of giving to main frame. Created 5 years 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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 } 2816 }
2817 2817
2818 void RenderWidgetHostViewAura::ForwardKeyboardEvent( 2818 void RenderWidgetHostViewAura::ForwardKeyboardEvent(
2819 const NativeWebKeyboardEvent& event) { 2819 const NativeWebKeyboardEvent& event) {
2820 RenderWidgetHostImpl* target_host = host_; 2820 RenderWidgetHostImpl* target_host = host_;
2821 2821
2822 // If there are multiple widgets on the page (such as when there are 2822 // If there are multiple widgets on the page (such as when there are
2823 // out-of-process iframes), pick the one that should process this event. 2823 // out-of-process iframes), pick the one that should process this event.
2824 if (host_->delegate()) 2824 if (host_->delegate())
2825 target_host = host_->delegate()->GetFocusedRenderWidgetHost(host_); 2825 target_host = host_->delegate()->GetFocusedRenderWidgetHost(host_);
2826 if (!target_host)
2827 return;
2826 2828
2827 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 2829 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
2828 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = 2830 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate =
2829 ui::GetTextEditKeyBindingsDelegate(); 2831 ui::GetTextEditKeyBindingsDelegate();
2830 std::vector<ui::TextEditCommandAuraLinux> commands; 2832 std::vector<ui::TextEditCommandAuraLinux> commands;
2831 if (!event.skip_in_browser && 2833 if (!event.skip_in_browser &&
2832 keybinding_delegate && 2834 keybinding_delegate &&
2833 event.os_event && 2835 event.os_event &&
2834 keybinding_delegate->MatchEvent(*event.os_event, &commands)) { 2836 keybinding_delegate->MatchEvent(*event.os_event, &commands)) {
2835 // Transform from ui/ types to content/ types. 2837 // Transform from ui/ types to content/ types.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 2990
2989 //////////////////////////////////////////////////////////////////////////////// 2991 ////////////////////////////////////////////////////////////////////////////////
2990 // RenderWidgetHostViewBase, public: 2992 // RenderWidgetHostViewBase, public:
2991 2993
2992 // static 2994 // static
2993 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2995 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2994 GetScreenInfoForWindow(results, NULL); 2996 GetScreenInfoForWindow(results, NULL);
2995 } 2997 }
2996 2998
2997 } // namespace content 2999 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698