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

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

Issue 8870003: Merge BorderContentsView into BubbleFrameView; simplify. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/page_info_bubble_view.h" 5 #include "chrome/browser/ui/views/page_info_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/certificate_viewer.h" 10 #include "chrome/browser/certificate_viewer.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 SizeToContents(); 291 SizeToContents();
292 #else 292 #else
293 resize_animation_.SetSlideDuration(kPageInfoSlideDuration); 293 resize_animation_.SetSlideDuration(kPageInfoSlideDuration);
294 resize_animation_.Show(); 294 resize_animation_.Show();
295 #endif 295 #endif
296 } 296 }
297 297
298 gfx::Rect PageInfoBubbleView::GetAnchorRect() { 298 gfx::Rect PageInfoBubbleView::GetAnchorRect() {
299 // Compensate for some built-in padding in the icon. 299 // Compensate for some built-in padding in the icon.
300 gfx::Rect anchor(BubbleDelegateView::GetAnchorRect()); 300 gfx::Rect anchor(BubbleDelegateView::GetAnchorRect());
301 if (anchor_view()) 301 anchor.Inset(0, anchor_view() ? 5 : 0);
302 anchor.Offset(0, -5);
303 return anchor; 302 return anchor;
304 } 303 }
305 304
306 void PageInfoBubbleView::LinkClicked(views::Link* source, int event_flags) { 305 void PageInfoBubbleView::LinkClicked(views::Link* source, int event_flags) {
307 GURL url = google_util::AppendGoogleLocaleParam( 306 GURL url = google_util::AppendGoogleLocaleParam(
308 GURL(chrome::kPageInfoHelpCenterURL)); 307 GURL(chrome::kPageInfoHelpCenterURL));
309 Browser* browser = BrowserList::GetLastActive(); 308 Browser* browser = BrowserList::GetLastActive();
310 browser->OpenURL( 309 browser->OpenURL(
311 url, GURL(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK); 310 url, GURL(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK);
312 // NOTE: The bubble closes automatically on deactivation as the link opens. 311 // NOTE: The bubble closes automatically on deactivation as the link opens.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 const GURL& url, 474 const GURL& url,
476 const NavigationEntry::SSLStatus& ssl, 475 const NavigationEntry::SSLStatus& ssl,
477 bool show_history) { 476 bool show_history) {
478 PageInfoBubbleView* page_info_bubble = 477 PageInfoBubbleView* page_info_bubble =
479 new PageInfoBubbleView(anchor_view, profile, url, ssl, show_history); 478 new PageInfoBubbleView(anchor_view, profile, url, ssl, show_history);
480 browser::CreateViewsBubble(page_info_bubble); 479 browser::CreateViewsBubble(page_info_bubble);
481 page_info_bubble->Show(); 480 page_info_bubble->Show();
482 } 481 }
483 482
484 } 483 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/global_error_bubble_view.cc ('k') | ui/views/bubble/border_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698