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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 545393002: Adding split view divider widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementing targeting for the divider, addressing mukai's feedback. Created 6 years, 3 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 // If a ui::InputMethod object is attached to the root window, character 849 // If a ui::InputMethod object is attached to the root window, character
850 // events are handled inside the object and are not passed to this function. 850 // events are handled inside the object and are not passed to this function.
851 // If such object is not attached, character events might be sent (e.g. on 851 // If such object is not attached, character events might be sent (e.g. on
852 // Windows). In this case, we just skip these. 852 // Windows). In this case, we just skip these.
853 return; 853 return;
854 } 854 }
855 // Renderer may send a key event back to us if the key event wasn't handled, 855 // Renderer may send a key event back to us if the key event wasn't handled,
856 // and the window may be invisible by that time. 856 // and the window may be invisible by that time.
857 if (!window_->IsVisible()) 857 if (!window_->IsVisible())
858 return; 858 return;
859 GetWidget()->GetInputMethod()->DispatchKeyEvent(*event); 859 InputMethod* input_method = GetWidget()->GetInputMethod();
860 if (!input_method)
861 return;
862 input_method->DispatchKeyEvent(*event);
sadrul 2014/09/15 14:32:29 Remove from this patch.
mfomitchev 2014/09/15 16:37:24 Ok, I will create a separate one for this. And act
860 if (switches::IsTextInputFocusManagerEnabled()) { 863 if (switches::IsTextInputFocusManagerEnabled()) {
861 FocusManager* focus_manager = GetWidget()->GetFocusManager(); 864 FocusManager* focus_manager = GetWidget()->GetFocusManager();
862 delegate_->OnKeyEvent(event); 865 delegate_->OnKeyEvent(event);
863 if (!event->handled() && focus_manager) 866 if (!event->handled() && focus_manager)
864 focus_manager->OnKeyEvent(*event); 867 focus_manager->OnKeyEvent(*event);
865 } 868 }
866 event->SetHandled(); 869 event->SetHandled();
867 } 870 }
868 871
869 void NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { 872 void NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); 1171 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont));
1169 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); 1172 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont)));
1170 return gfx::FontList(gfx::Font(caption_font)); 1173 return gfx::FontList(gfx::Font(caption_font));
1171 #else 1174 #else
1172 return gfx::FontList(); 1175 return gfx::FontList();
1173 #endif 1176 #endif
1174 } 1177 }
1175 1178
1176 } // namespace internal 1179 } // namespace internal
1177 } // namespace views 1180 } // namespace views
OLDNEW
« athena/wm/window_manager_impl.cc ('K') | « athena/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698