OLD | NEW |
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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 // destruction unless WIDGET_OWNS_NATIVE_WIDGET is set (which is just the | 914 // destruction unless WIDGET_OWNS_NATIVE_WIDGET is set (which is just the |
915 // case in tests). | 915 // case in tests). |
916 if (!destroying_) { | 916 if (!destroying_) { |
917 if (GetWidget()->GetInputMethod()) | 917 if (GetWidget()->GetInputMethod()) |
918 GetWidget()->GetInputMethod()->OnBlur(); | 918 GetWidget()->GetInputMethod()->OnBlur(); |
919 } else { | 919 } else { |
920 DCHECK_EQ(ownership_, Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET); | 920 DCHECK_EQ(ownership_, Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET); |
921 } | 921 } |
922 | 922 |
923 delegate_->OnNativeBlur(gained_focus); | 923 delegate_->OnNativeBlur(gained_focus); |
924 if (GetWidget()->GetFocusManager()) | 924 GetWidget()->GetFocusManager()->StoreFocusedView(true); |
925 GetWidget()->GetFocusManager()->StoreFocusedView(true); | |
926 } | 925 } |
927 } | 926 } |
928 | 927 |
929 //////////////////////////////////////////////////////////////////////////////// | 928 //////////////////////////////////////////////////////////////////////////////// |
930 // NativeWidgetAura, aura::WindowDragDropDelegate implementation: | 929 // NativeWidgetAura, aura::WindowDragDropDelegate implementation: |
931 | 930 |
932 void NativeWidgetAura::OnDragEntered(const ui::DropTargetEvent& event) { | 931 void NativeWidgetAura::OnDragEntered(const ui::DropTargetEvent& event) { |
933 DCHECK(drop_helper_.get() != NULL); | 932 DCHECK(drop_helper_.get() != NULL); |
934 last_drop_operation_ = drop_helper_->OnDragOver(event.data(), | 933 last_drop_operation_ = drop_helper_->OnDragOver(event.data(), |
935 event.location(), event.source_operations()); | 934 event.location(), event.source_operations()); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1155 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
1157 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1156 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
1158 return gfx::FontList(gfx::Font(caption_font)); | 1157 return gfx::FontList(gfx::Font(caption_font)); |
1159 #else | 1158 #else |
1160 return gfx::FontList(); | 1159 return gfx::FontList(); |
1161 #endif | 1160 #endif |
1162 } | 1161 } |
1163 | 1162 |
1164 } // namespace internal | 1163 } // namespace internal |
1165 } // namespace views | 1164 } // namespace views |
OLD | NEW |