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

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

Issue 185623002: Add Hide and Show to the app list SearchBoxView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares_contents_switcher
Patch Set: Created 6 years, 9 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/search_box_view.h » ('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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 void AppListView::Close() { 184 void AppListView::Close() {
185 app_list_main_view_->Close(); 185 app_list_main_view_->Close();
186 delegate_->Dismiss(); 186 delegate_->Dismiss();
187 } 187 }
188 188
189 void AppListView::UpdateBounds() { 189 void AppListView::UpdateBounds() {
190 SizeToContents(); 190 SizeToContents();
191 } 191 }
192 192
193 void AppListView::RepaintBackground() {
tapted 2014/03/04 05:27:01 calls to `SchedulePaint()` propagate up through to
194 GetBubbleFrameView()->SchedulePaint();
195 }
196
193 gfx::Size AppListView::GetPreferredSize() { 197 gfx::Size AppListView::GetPreferredSize() {
194 return app_list_main_view_->GetPreferredSize(); 198 return app_list_main_view_->GetPreferredSize();
195 } 199 }
196 200
197 void AppListView::Paint(gfx::Canvas* canvas) { 201 void AppListView::Paint(gfx::Canvas* canvas) {
198 views::BubbleDelegateView::Paint(canvas); 202 views::BubbleDelegateView::Paint(canvas);
199 if (g_next_paint_callback) { 203 if (g_next_paint_callback) {
200 g_next_paint_callback(); 204 g_next_paint_callback();
201 g_next_paint_callback = NULL; 205 g_next_paint_callback = NULL;
202 } 206 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 return GetWidget()->GetTopLevelWidget()->GetNativeWindow(); 258 return GetWidget()->GetTopLevelWidget()->GetNativeWindow();
255 #endif 259 #endif
256 } 260 }
257 #endif 261 #endif
258 262
259 void AppListView::InitAsBubbleInternal(gfx::NativeView parent, 263 void AppListView::InitAsBubbleInternal(gfx::NativeView parent,
260 PaginationModel* pagination_model, 264 PaginationModel* pagination_model,
261 views::BubbleBorder::Arrow arrow, 265 views::BubbleBorder::Arrow arrow,
262 bool border_accepts_events, 266 bool border_accepts_events,
263 const gfx::Vector2d& anchor_offset) { 267 const gfx::Vector2d& anchor_offset) {
264 app_list_main_view_ = new AppListMainView(delegate_.get(), 268 app_list_main_view_ = new AppListMainView(this,
269 delegate_.get(),
265 pagination_model, 270 pagination_model,
266 parent); 271 parent);
267 AddChildView(app_list_main_view_); 272 AddChildView(app_list_main_view_);
268 #if defined(USE_AURA) 273 #if defined(USE_AURA)
269 app_list_main_view_->SetPaintToLayer(true); 274 app_list_main_view_->SetPaintToLayer(true);
270 app_list_main_view_->SetFillsBoundsOpaquely(false); 275 app_list_main_view_->SetFillsBoundsOpaquely(false);
271 app_list_main_view_->layer()->SetMasksToBounds(true); 276 app_list_main_view_->layer()->SetMasksToBounds(true);
272 #endif 277 #endif
273 278
274 signin_view_ = 279 signin_view_ =
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 #else 497 #else
493 speech_view_->SetVisible(recognizing); 498 speech_view_->SetVisible(recognizing);
494 app_list_main_view_->SetVisible(!recognizing); 499 app_list_main_view_->SetVisible(!recognizing);
495 500
496 // Needs to schedule paint of AppListView itself, to repaint the background. 501 // Needs to schedule paint of AppListView itself, to repaint the background.
497 GetBubbleFrameView()->SchedulePaint(); 502 GetBubbleFrameView()->SchedulePaint();
498 #endif 503 #endif
499 } 504 }
500 505
501 } // namespace app_list 506 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/search_box_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698