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

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

Issue 267593005: Refactor menu controller to isolate aura dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing initializer Created 6 years, 7 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 | Annotate | Revision Log
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 18 matching lines...) Expand all
29 #include "ui/views/ime/input_method_bridge.h" 29 #include "ui/views/ime/input_method_bridge.h"
30 #include "ui/views/ime/null_input_method.h" 30 #include "ui/views/ime/null_input_method.h"
31 #include "ui/views/views_delegate.h" 31 #include "ui/views/views_delegate.h"
32 #include "ui/views/widget/drop_helper.h" 32 #include "ui/views/widget/drop_helper.h"
33 #include "ui/views/widget/native_widget_delegate.h" 33 #include "ui/views/widget/native_widget_delegate.h"
34 #include "ui/views/widget/root_view.h" 34 #include "ui/views/widget/root_view.h"
35 #include "ui/views/widget/tooltip_manager_aura.h" 35 #include "ui/views/widget/tooltip_manager_aura.h"
36 #include "ui/views/widget/widget_aura_utils.h" 36 #include "ui/views/widget/widget_aura_utils.h"
37 #include "ui/views/widget/widget_delegate.h" 37 #include "ui/views/widget/widget_delegate.h"
38 #include "ui/views/widget/window_reorderer.h" 38 #include "ui/views/widget/window_reorderer.h"
39 #include "ui/wm/core/shadow_types.h"
39 #include "ui/wm/core/window_util.h" 40 #include "ui/wm/core/window_util.h"
40 #include "ui/wm/public/activation_client.h" 41 #include "ui/wm/public/activation_client.h"
41 #include "ui/wm/public/drag_drop_client.h" 42 #include "ui/wm/public/drag_drop_client.h"
42 #include "ui/wm/public/window_move_client.h" 43 #include "ui/wm/public/window_move_client.h"
43 #include "ui/wm/public/window_types.h" 44 #include "ui/wm/public/window_types.h"
44 45
45 #if defined(OS_WIN) 46 #if defined(OS_WIN)
46 #include "base/win/scoped_gdi_object.h" 47 #include "base/win/scoped_gdi_object.h"
47 #include "base/win/win_util.h" 48 #include "base/win/win_util.h"
48 #include "ui/base/l10n/l10n_util_win.h" 49 #include "ui/base/l10n/l10n_util_win.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 bool NativeWidgetAura::IsFullscreen() const { 582 bool NativeWidgetAura::IsFullscreen() const {
582 return window_ && window_->GetProperty(aura::client::kShowStateKey) == 583 return window_ && window_->GetProperty(aura::client::kShowStateKey) ==
583 ui::SHOW_STATE_FULLSCREEN; 584 ui::SHOW_STATE_FULLSCREEN;
584 } 585 }
585 586
586 void NativeWidgetAura::SetOpacity(unsigned char opacity) { 587 void NativeWidgetAura::SetOpacity(unsigned char opacity) {
587 if (window_) 588 if (window_)
588 window_->layer()->SetOpacity(opacity / 255.0); 589 window_->layer()->SetOpacity(opacity / 255.0);
589 } 590 }
590 591
592 void NativeWidgetAura::SetHasActivationShadow(bool has_shadow) {
593 SetShadowType(window_, has_shadow ? wm::SHADOW_TYPE_RECTANGULAR
594 : wm::SHADOW_TYPE_NONE);
595 }
596
591 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { 597 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) {
592 NOTIMPLEMENTED(); 598 NOTIMPLEMENTED();
593 } 599 }
594 600
595 void NativeWidgetAura::FlashFrame(bool flash) { 601 void NativeWidgetAura::FlashFrame(bool flash) {
596 if (window_) 602 if (window_)
597 window_->SetProperty(aura::client::kDrawAttentionKey, flash); 603 window_->SetProperty(aura::client::kDrawAttentionKey, flash);
598 } 604 }
599 605
600 void NativeWidgetAura::RunShellDrag(View* view, 606 void NativeWidgetAura::RunShellDrag(View* view,
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); 1163 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont));
1158 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); 1164 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont)));
1159 return gfx::FontList(gfx::Font(caption_font)); 1165 return gfx::FontList(gfx::Font(caption_font));
1160 #else 1166 #else
1161 return gfx::FontList(); 1167 return gfx::FontList();
1162 #endif 1168 #endif
1163 } 1169 }
1164 1170
1165 } // namespace internal 1171 } // namespace internal
1166 } // namespace views 1172 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698