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

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

Issue 111873004: [OriginChip] Show and select the URL on alt-d/ctrl-l. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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
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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 // that the location bar view is visible and is considered focusable. If the 1043 // that the location bar view is visible and is considered focusable. If the
1044 // location bar view gains focus, |immersive_mode_controller_| will keep the 1044 // location bar view gains focus, |immersive_mode_controller_| will keep the
1045 // top-of-window views revealed. 1045 // top-of-window views revealed.
1046 scoped_ptr<ImmersiveRevealedLock> focus_reveal_lock( 1046 scoped_ptr<ImmersiveRevealedLock> focus_reveal_lock(
1047 immersive_mode_controller_->GetRevealedLock( 1047 immersive_mode_controller_->GetRevealedLock(
1048 ImmersiveModeController::ANIMATE_REVEAL_YES)); 1048 ImmersiveModeController::ANIMATE_REVEAL_YES));
1049 1049
1050 LocationBarView* location_bar = GetLocationBarView(); 1050 LocationBarView* location_bar = GetLocationBarView();
1051 if (location_bar->omnibox_view()->IsFocusable()) { 1051 if (location_bar->omnibox_view()->IsFocusable()) {
1052 // Location bar got focus. 1052 // Location bar got focus.
1053 location_bar->FocusLocation(select_all); 1053 if (chrome::ShouldDisplayOriginChip())
1054 location_bar->omnibox_view()->ShowURL();
1055 else
1056 location_bar->FocusLocation(select_all);
1054 } else { 1057 } else {
1055 // If none of location bar got focus, then clear focus. 1058 // If none of location bar got focus, then clear focus.
1056 views::FocusManager* focus_manager = GetFocusManager(); 1059 views::FocusManager* focus_manager = GetFocusManager();
1057 DCHECK(focus_manager); 1060 DCHECK(focus_manager);
1058 focus_manager->ClearFocus(); 1061 focus_manager->ClearFocus();
1059 } 1062 }
1060 } 1063 }
1061 1064
1062 void BrowserView::UpdateReloadStopState(bool is_loading, bool force) { 1065 void BrowserView::UpdateReloadStopState(bool is_loading, bool force) {
1063 toolbar_->reload_button()->ChangeMode( 1066 toolbar_->reload_button()->ChangeMode(
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
2668 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2671 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2669 gfx::Point icon_bottom( 2672 gfx::Point icon_bottom(
2670 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2673 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2671 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2674 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2672 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2675 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2673 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2676 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2674 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2677 top_arrow_height = infobar_top.y() - icon_bottom.y();
2675 } 2678 }
2676 return top_arrow_height; 2679 return top_arrow_height;
2677 } 2680 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698