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/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 ->apps_grid_view() | 313 ->apps_grid_view() |
314 ->pagination_model(); | 314 ->pagination_model(); |
315 } | 315 } |
316 | 316 |
317 void AppListView::InitAsBubbleInternal(gfx::NativeView parent, | 317 void AppListView::InitAsBubbleInternal(gfx::NativeView parent, |
318 int initial_apps_page, | 318 int initial_apps_page, |
319 views::BubbleBorder::Arrow arrow, | 319 views::BubbleBorder::Arrow arrow, |
320 bool border_accepts_events, | 320 bool border_accepts_events, |
321 const gfx::Vector2d& anchor_offset) { | 321 const gfx::Vector2d& anchor_offset) { |
322 app_list_main_view_ = | 322 app_list_main_view_ = |
323 new AppListMainView(delegate_.get(), initial_apps_page, parent); | 323 new AppListMainView(delegate_, initial_apps_page, parent); |
324 AddChildView(app_list_main_view_); | 324 AddChildView(app_list_main_view_); |
325 app_list_main_view_->SetPaintToLayer(true); | 325 app_list_main_view_->SetPaintToLayer(true); |
326 app_list_main_view_->SetFillsBoundsOpaquely(false); | 326 app_list_main_view_->SetFillsBoundsOpaquely(false); |
327 app_list_main_view_->layer()->SetMasksToBounds(true); | 327 app_list_main_view_->layer()->SetMasksToBounds(true); |
328 | 328 |
329 // Speech recognition is available only when the start page exists. | 329 // Speech recognition is available only when the start page exists. |
330 if (delegate_ && delegate_->IsSpeechRecognitionEnabled()) { | 330 if (delegate_ && delegate_->IsSpeechRecognitionEnabled()) { |
331 speech_view_ = new SpeechView(delegate_.get()); | 331 speech_view_ = new SpeechView(delegate_); |
332 speech_view_->SetVisible(false); | 332 speech_view_->SetVisible(false); |
333 speech_view_->SetPaintToLayer(true); | 333 speech_view_->SetPaintToLayer(true); |
334 speech_view_->SetFillsBoundsOpaquely(false); | 334 speech_view_->SetFillsBoundsOpaquely(false); |
335 speech_view_->layer()->SetOpacity(0.0f); | 335 speech_view_->layer()->SetOpacity(0.0f); |
336 AddChildView(speech_view_); | 336 AddChildView(speech_view_); |
337 } | 337 } |
338 | 338 |
339 if (app_list::switches::IsExperimentalAppListEnabled()) { | 339 if (app_list::switches::IsExperimentalAppListEnabled()) { |
340 // Draw a banner in the corner of the experimental app list. | 340 // Draw a banner in the corner of the experimental app list. |
341 experimental_banner_view_ = new views::ImageView; | 341 experimental_banner_view_ = new views::ImageView; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 speech_view_->layer()->SetTransform(speech_transform); | 584 speech_view_->layer()->SetTransform(speech_transform); |
585 } | 585 } |
586 | 586 |
587 if (will_appear) | 587 if (will_appear) |
588 speech_view_->SetVisible(true); | 588 speech_view_->SetVisible(true); |
589 else | 589 else |
590 app_list_main_view_->SetVisible(true); | 590 app_list_main_view_->SetVisible(true); |
591 } | 591 } |
592 | 592 |
593 } // namespace app_list | 593 } // namespace app_list |
OLD | NEW |