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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_model.cc

Issue 233623002: Shows the info bubble when the location bar icon is clicked in the origin chip. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/toolbar/toolbar_model.h" 5 #include "chrome/browser/ui/toolbar/toolbar_model.h"
6 6
7 #include "chrome/browser/search/search.h"
8
7 ToolbarModel::ToolbarModel() 9 ToolbarModel::ToolbarModel()
8 : input_in_progress_(false), 10 : input_in_progress_(false),
9 origin_chip_enabled_(true), 11 origin_chip_enabled_(true),
10 url_replacement_enabled_(true) { 12 url_replacement_enabled_(true) {
11 } 13 }
12 14
13 ToolbarModel::~ToolbarModel() { 15 ToolbarModel::~ToolbarModel() {
14 } 16 }
15 17
16 bool ToolbarModel::WouldReplaceURL() const { 18 bool ToolbarModel::WouldReplaceURL() const {
17 return WouldOmitURLDueToOriginChip() || 19 return WouldOmitURLDueToOriginChip() ||
18 WouldPerformSearchTermReplacement(false); 20 WouldPerformSearchTermReplacement(false);
19 } 21 }
22
23 bool ToolbarModel::ShouldShowOriginChip() const {
24 return chrome::ShouldDisplayOriginChipV2() &&
25 WouldOmitURLDueToOriginChip() &&
26 origin_chip_enabled();
27 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.h ('k') | chrome/browser/ui/toolbar/toolbar_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698