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

Side by Side Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 10816027: alternate ntp: toolbar background and separator animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android build break Created 8 years, 4 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 | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/chrome_tests.gypi » ('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 "chrome/browser/ui/views/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar_view.h"
6 6
7 #include "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/command_updater.h" 10 #include "chrome/browser/command_updater.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 void ToolbarView::OnInputInProgress(bool in_progress) { 482 void ToolbarView::OnInputInProgress(bool in_progress) {
483 // The edit should make sure we're only notified when something changes. 483 // The edit should make sure we're only notified when something changes.
484 DCHECK(model_->input_in_progress() != in_progress); 484 DCHECK(model_->input_in_progress() != in_progress);
485 485
486 model_->set_input_in_progress(in_progress); 486 model_->set_input_in_progress(in_progress);
487 location_bar_->Update(NULL); 487 location_bar_->Update(NULL);
488 } 488 }
489 489
490 //////////////////////////////////////////////////////////////////////////////// 490 ////////////////////////////////////////////////////////////////////////////////
491 // ToolbarView, chrome::search::SearchModelObserver implementation: 491 // ToolbarView, chrome::search::SearchModelObserver implementation:
492 void ToolbarView::ModeChanged(const chrome::search::Mode& mode) { 492 void ToolbarView::ModeChanged(const chrome::search::Mode& old_mode,
493 const chrome::search::Mode& new_mode) {
493 // Layout location bar to determine the visibility of each of its child 494 // Layout location bar to determine the visibility of each of its child
494 // view based on toolbar mode change. 495 // view based on toolbar mode change.
495 if (mode.is_ntp()) 496 if (new_mode.is_ntp())
496 location_bar_->Layout(); 497 location_bar_->Layout();
497 498
498 Layout(); 499 Layout();
499 LayoutForSearch(); 500 LayoutForSearch();
500 SchedulePaint(); 501 SchedulePaint();
501 } 502 }
502 503
503 //////////////////////////////////////////////////////////////////////////////// 504 ////////////////////////////////////////////////////////////////////////////////
504 // ToolbarView, CommandObserver implementation: 505 // ToolbarView, CommandObserver implementation:
505 506
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 // LocationBarContainer is not a child of the ToolbarView. 1013 // LocationBarContainer is not a child of the ToolbarView.
1013 gfx::Point origin(bounds.origin()); 1014 gfx::Point origin(bounds.origin());
1014 views::View::ConvertPointToView(this, location_bar_container_->parent(), 1015 views::View::ConvertPointToView(this, location_bar_container_->parent(),
1015 &origin); 1016 &origin);
1016 gfx::Rect target_bounds(origin, bounds.size()); 1017 gfx::Rect target_bounds(origin, bounds.size());
1017 if (location_bar_container_->GetTargetBounds() != target_bounds) { 1018 if (location_bar_container_->GetTargetBounds() != target_bounds) {
1018 location_bar_container_->SetInToolbar(true); 1019 location_bar_container_->SetInToolbar(true);
1019 location_bar_container_->SetBoundsRect(target_bounds); 1020 location_bar_container_->SetBoundsRect(target_bounds);
1020 } 1021 }
1021 } 1022 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698