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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_origin_chip_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/toolbar_origin_chip_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_origin_chip_view.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 location_icon_view_->page_info_helper()->ProcessEvent(located_event); 334 location_icon_view_->page_info_helper()->ProcessEvent(located_event);
335 location_icon_view_->set_interactive(false); 335 location_icon_view_->set_interactive(false);
336 return; 336 return;
337 } 337 }
338 location_icon_view_->set_interactive(false); 338 location_icon_view_->set_interactive(false);
339 } 339 }
340 340
341 UMA_HISTOGRAM_COUNTS("OriginChip.Pressed", 1); 341 UMA_HISTOGRAM_COUNTS("OriginChip.Pressed", 1);
342 content::RecordAction(base::UserMetricsAction("OriginChipPress")); 342 content::RecordAction(base::UserMetricsAction("OriginChipPress"));
343 343
344 toolbar_view_->location_bar()->GetOmniboxView()->ShowURL(); 344 toolbar_view_->location_bar()->ShowURL();
345 } 345 }
346 346
347 void ToolbarOriginChipView::WriteDragDataForView(View* sender, 347 void ToolbarOriginChipView::WriteDragDataForView(View* sender,
348 const gfx::Point& press_pt, 348 const gfx::Point& press_pt,
349 OSExchangeData* data) { 349 OSExchangeData* data) {
350 // TODO(gbillock): Consolidate this with the identical logic in 350 // TODO(gbillock): Consolidate this with the identical logic in
351 // LocationBarView. 351 // LocationBarView.
352 content::WebContents* web_contents = toolbar_view_->GetWebContents(); 352 content::WebContents* web_contents = toolbar_view_->GetWebContents();
353 FaviconTabHelper* favicon_tab_helper = 353 FaviconTabHelper* favicon_tab_helper =
354 FaviconTabHelper::FromWebContents(web_contents); 354 FaviconTabHelper::FromWebContents(web_contents);
(...skipping 18 matching lines...) Expand all
373 373
374 // Note: When OnSafeBrowsingHit would be called, OnSafeBrowsingMatch will 374 // Note: When OnSafeBrowsingHit would be called, OnSafeBrowsingMatch will
375 // have already been called. 375 // have already been called.
376 void ToolbarOriginChipView::OnSafeBrowsingHit( 376 void ToolbarOriginChipView::OnSafeBrowsingHit(
377 const SafeBrowsingUIManager::UnsafeResource& resource) {} 377 const SafeBrowsingUIManager::UnsafeResource& resource) {}
378 378
379 void ToolbarOriginChipView::OnSafeBrowsingMatch( 379 void ToolbarOriginChipView::OnSafeBrowsingMatch(
380 const SafeBrowsingUIManager::UnsafeResource& resource) { 380 const SafeBrowsingUIManager::UnsafeResource& resource) {
381 OnChanged(); 381 OnChanged();
382 } 382 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698