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

Side by Side Diff: ui/app_list/views/app_list_view.cc

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments 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
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698