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

Side by Side Diff: ash/launcher/launcher_view.cc

Issue 9692021: Revert 126256 - Show a different icon in the launcher for incognito windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/launcher/launcher_unittest.cc ('k') | ash/launcher/tabbed_launcher_button.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 "ash/launcher/launcher_view.h" 5 #include "ash/launcher/launcher_view.h"
6 6
7 #include "ash/launcher/launcher_button.h" 7 #include "ash/launcher/launcher_button.h"
8 #include "ash/launcher/launcher_delegate.h" 8 #include "ash/launcher/launcher_delegate.h"
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/launcher/launcher_window_cycler.h" 10 #include "ash/launcher/launcher_window_cycler.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 bounds_animator_->AnimateViewTo(view_model_->view_at(i), 325 bounds_animator_->AnimateViewTo(view_model_->view_at(i),
326 view_model_->ideal_bounds(i)); 326 view_model_->ideal_bounds(i));
327 } 327 }
328 overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds); 328 overflow_button_->SetBoundsRect(ideal_bounds.overflow_bounds);
329 } 329 }
330 330
331 views::View* LauncherView::CreateViewForItem(const LauncherItem& item) { 331 views::View* LauncherView::CreateViewForItem(const LauncherItem& item) {
332 views::View* view = NULL; 332 views::View* view = NULL;
333 switch (item.type) { 333 switch (item.type) {
334 case TYPE_TABBED: { 334 case TYPE_TABBED: {
335 TabbedLauncherButton* button = 335 TabbedLauncherButton* button = TabbedLauncherButton::Create(this, this);
336 TabbedLauncherButton::Create(
337 this,
338 this,
339 item.is_incognito ?
340 TabbedLauncherButton::STATE_INCOGNITO :
341 TabbedLauncherButton::STATE_NOT_INCOGNITO);
342 button->SetTabImage(item.image); 336 button->SetTabImage(item.image);
343 button->set_context_menu_controller(this); 337 button->set_context_menu_controller(this);
344 ReflectItemStatus(item, button); 338 ReflectItemStatus(item, button);
345 view = button; 339 view = button;
346 break; 340 break;
347 } 341 }
348 342
349 case TYPE_APP: { 343 case TYPE_APP: {
350 LauncherButton* button = LauncherButton::Create(this, this); 344 LauncherButton* button = LauncherButton::Create(this, this);
351 button->SetImage(item.image); 345 button->SetImage(item.image);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 // code. 727 // code.
734 if (launcher_menu_runner_->RunMenuAt( 728 if (launcher_menu_runner_->RunMenuAt(
735 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), 729 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
736 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) 730 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED)
737 return; 731 return;
738 #endif 732 #endif
739 } 733 }
740 734
741 } // namespace internal 735 } // namespace internal
742 } // namespace ash 736 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_unittest.cc ('k') | ash/launcher/tabbed_launcher_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698