Index: ui/app_list/views/app_list_view.cc |
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc |
index 0233aaa9c3ee987ea52935f6048b8c73631b97e0..2c0b69296d21db318f4e92306c99b60a50d6f707 100644 |
--- a/ui/app_list/views/app_list_view.cc |
+++ b/ui/app_list/views/app_list_view.cc |
@@ -24,6 +24,8 @@ |
#include "ui/app_list/views/search_box_view.h" |
#include "ui/app_list/views/signin_view.h" |
#include "ui/app_list/views/speech_view.h" |
+#include "ui/aura/window.h" |
+#include "ui/aura/window_tree_host.h" |
#include "ui/base/ui_base_switches.h" |
#include "ui/compositor/layer.h" |
#include "ui/compositor/layer_animation_observer.h" |
@@ -38,16 +40,13 @@ |
#include "ui/views/layout/fill_layout.h" |
#include "ui/views/widget/widget.h" |
-#if defined(USE_AURA) |
-#include "ui/aura/window.h" |
-#include "ui/aura/window_tree_host.h" |
#if defined(OS_WIN) |
#include "ui/base/win/shell.h" |
#endif |
+ |
#if !defined(OS_CHROMEOS) |
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
#endif |
-#endif // defined(USE_AURA) |
namespace app_list { |
@@ -252,13 +251,9 @@ void AppListView::SetNextPaintCallback(void (*callback)()) { |
#if defined(OS_WIN) |
HWND AppListView::GetHWND() const { |
-#if defined(USE_AURA) |
gfx::NativeWindow window = |
GetWidget()->GetTopLevelWidget()->GetNativeWindow(); |
return window->GetHost()->GetAcceleratedWidget(); |
-#else |
- return GetWidget()->GetTopLevelWidget()->GetNativeWindow(); |
-#endif |
} |
#endif |
@@ -271,11 +266,9 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent, |
pagination_model, |
parent); |
AddChildView(app_list_main_view_); |
-#if defined(USE_AURA) |
app_list_main_view_->SetPaintToLayer(true); |
app_list_main_view_->SetFillsBoundsOpaquely(false); |
app_list_main_view_->layer()->SetMasksToBounds(true); |
-#endif |
signin_view_ = |
new SigninView(delegate_->GetSigninDelegate(), |
@@ -286,11 +279,9 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent, |
if (delegate_ && delegate_->GetSpeechRecognitionContents()) { |
speech_view_ = new SpeechView(delegate_.get()); |
speech_view_->SetVisible(false); |
-#if defined(USE_AURA) |
speech_view_->SetPaintToLayer(true); |
speech_view_->SetFillsBoundsOpaquely(false); |
speech_view_->layer()->SetOpacity(0.0f); |
-#endif |
AddChildView(speech_view_); |
} |
@@ -311,7 +302,6 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent, |
views::BubbleDelegateView::CreateBubble(this); |
SetBubbleArrow(arrow); |
-#if defined(USE_AURA) |
tapted
2014/04/23 23:38:09
I think this and one below were the only USE_AURA
|
aura::Window* window = GetWidget()->GetNativeWindow(); |
window->layer()->SetMasksToBounds(true); |
GetBubbleFrameView()->set_background(new AppListBackground( |
@@ -320,18 +310,6 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent, |
set_background(NULL); |
window->SetEventTargeter(scoped_ptr<ui::EventTargeter>( |
new views::BubbleWindowTargeter(this))); |
-#else |
- set_background(new AppListBackground( |
- GetBubbleFrameView()->bubble_border()->GetBorderCornerRadius(), |
- app_list_main_view_)); |
- |
- // On non-aura the bubble has two widgets, and it's possible for the border |
- // to be shown independently in odd situations. Explicitly hide the bubble |
- // widget to ensure that any WM_WINDOWPOSCHANGED messages triggered by the |
- // window manager do not have the SWP_SHOWWINDOW flag set which would cause |
- // the border to be shown. See http://crbug.com/231687 . |
- GetWidget()->Hide(); |
-#endif |
if (delegate_) |
delegate_->ViewInitialized(); |
@@ -340,7 +318,7 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent, |
void AppListView::OnBeforeBubbleWidgetInit( |
views::Widget::InitParams* params, |
views::Widget* widget) const { |
-#if defined(USE_AURA) && !defined(OS_CHROMEOS) |
tapted
2014/04/23 23:38:09
mac-views won't like this either :)
|
+#if !defined(OS_CHROMEOS) |
if (delegate_ && delegate_->ForceNativeDesktop()) |
params->native_widget = new views::DesktopNativeWidgetAura(widget); |
#endif |
@@ -470,7 +448,6 @@ void AppListView::OnSpeechRecognitionStateChanged( |
if (recognizing) |
speech_view_->Reset(); |
-#if defined(USE_AURA) |
animation_observer_->set_frame(GetBubbleFrameView()); |
gfx::Transform speech_transform; |
speech_transform.Translate( |
@@ -507,13 +484,6 @@ void AppListView::OnSpeechRecognitionStateChanged( |
speech_view_->SetVisible(true); |
else |
app_list_main_view_->SetVisible(true); |
-#else |
- speech_view_->SetVisible(recognizing); |
- app_list_main_view_->SetVisible(!recognizing); |
- |
- // Needs to schedule paint of AppListView itself, to repaint the background. |
- GetBubbleFrameView()->SchedulePaint(); |
-#endif |
} |
} // namespace app_list |