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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 200783003: [OriginChip] Add animations for the hiding and showing of the chip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 1046
1047 LocationBarView* location_bar = GetLocationBarView(); 1047 LocationBarView* location_bar = GetLocationBarView();
1048 if (location_bar->omnibox_view()->IsFocusable()) { 1048 if (location_bar->omnibox_view()->IsFocusable()) {
1049 // Location bar got focus. 1049 // Location bar got focus.
1050 // 1050 //
1051 // select_all is true when it's expected that the user may want to copy 1051 // select_all is true when it's expected that the user may want to copy
1052 // the URL to the clipboard. If the URL is not being shown because the 1052 // the URL to the clipboard. If the URL is not being shown because the
1053 // origin chip is enabled, show it now to support the same functionality. 1053 // origin chip is enabled, show it now to support the same functionality.
1054 if (select_all && 1054 if (select_all &&
1055 location_bar->GetToolbarModel()->WouldOmitURLDueToOriginChip()) 1055 location_bar->GetToolbarModel()->WouldOmitURLDueToOriginChip())
1056 location_bar->omnibox_view()->ShowURL(); 1056 location_bar->ShowURL();
1057 else 1057 else
1058 location_bar->FocusLocation(select_all); 1058 location_bar->FocusLocation(select_all);
1059 } else { 1059 } else {
1060 // If none of location bar got focus, then clear focus. 1060 // If none of location bar got focus, then clear focus.
1061 views::FocusManager* focus_manager = GetFocusManager(); 1061 views::FocusManager* focus_manager = GetFocusManager();
1062 DCHECK(focus_manager); 1062 DCHECK(focus_manager);
1063 focus_manager->ClearFocus(); 1063 focus_manager->ClearFocus();
1064 } 1064 }
1065 } 1065 }
1066 1066
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2560 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2561 gfx::Point icon_bottom( 2561 gfx::Point icon_bottom(
2562 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2562 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2563 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2563 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2564 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2564 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2565 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2565 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2566 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2566 top_arrow_height = infobar_top.y() - icon_bottom.y();
2567 } 2567 }
2568 return top_arrow_height; 2568 return top_arrow_height;
2569 } 2569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698