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

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

Issue 853743002: First pass at fixing guest browser cookies issue. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete the Profile Manager. Guest Profile doesn't write to autocomplete/history. Views still needs … Created 5 years, 10 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_folder_view.cc ('k') | ui/app_list/views/apps_grid_view.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // AppListMainView: 108 // AppListMainView:
109 109
110 AppListMainView::AppListMainView(AppListViewDelegate* delegate) 110 AppListMainView::AppListMainView(AppListViewDelegate* delegate)
111 : delegate_(delegate), 111 : delegate_(delegate),
112 model_(delegate->GetModel()), 112 model_(delegate->GetModel()),
113 search_box_view_(nullptr), 113 search_box_view_(nullptr),
114 contents_view_(nullptr), 114 contents_view_(nullptr),
115 custom_page_clickzone_(nullptr), 115 custom_page_clickzone_(nullptr),
116 weak_ptr_factory_(this) { 116 weak_ptr_factory_(this) {
117 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 117 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
118 DLOG(ERROR) << "mainview";
118 model_->AddObserver(this); 119 model_->AddObserver(this);
119 } 120 }
120 121
121 AppListMainView::~AppListMainView() { 122 AppListMainView::~AppListMainView() {
122 pending_icon_loaders_.clear(); 123 pending_icon_loaders_.clear();
123 model_->RemoveObserver(this); 124 model_->RemoveObserver(this);
124 } 125 }
125 126
126 void AppListMainView::Init(gfx::NativeView parent, 127 void AppListMainView::Init(gfx::NativeView parent,
127 int initial_apps_page, 128 int initial_apps_page,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void AppListMainView::Close() { 185 void AppListMainView::Close() {
185 icon_loading_wait_timer_.Stop(); 186 icon_loading_wait_timer_.Stop();
186 contents_view_->CancelDrag(); 187 contents_view_->CancelDrag();
187 } 188 }
188 189
189 void AppListMainView::Prerender() { 190 void AppListMainView::Prerender() {
190 contents_view_->Prerender(); 191 contents_view_->Prerender();
191 } 192 }
192 193
193 void AppListMainView::ModelChanged() { 194 void AppListMainView::ModelChanged() {
195 DLOG(ERROR) << "modelchanged";
194 pending_icon_loaders_.clear(); 196 pending_icon_loaders_.clear();
195 model_->RemoveObserver(this); 197 model_->RemoveObserver(this);
196 model_ = delegate_->GetModel(); 198 model_ = delegate_->GetModel();
197 model_->AddObserver(this); 199 model_->AddObserver(this);
198 search_box_view_->ModelChanged(); 200 search_box_view_->ModelChanged();
199 delete contents_view_; 201 delete contents_view_;
200 contents_view_ = NULL; 202 contents_view_ = NULL;
201 AddContentsViews(); 203 AddContentsViews();
202 Layout(); 204 Layout();
203 } 205 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 contents_view_->Back(); 354 contents_view_->Back();
353 } 355 }
354 356
355 void AppListMainView::OnResultInstalled(SearchResult* result) { 357 void AppListMainView::OnResultInstalled(SearchResult* result) {
356 // Clears the search to show the apps grid. The last installed app 358 // Clears the search to show the apps grid. The last installed app
357 // should be highlighted and made visible already. 359 // should be highlighted and made visible already.
358 search_box_view_->ClearSearch(); 360 search_box_view_->ClearSearch();
359 } 361 }
360 362
361 } // namespace app_list 363 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_folder_view.cc ('k') | ui/app_list/views/apps_grid_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698