OLD | NEW |
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 #import "chrome/browser/ui/cocoa/page_info_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/page_info_bubble_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 - (IBAction)showCertWindow:(id)sender { | 205 - (IBAction)showCertWindow:(id)sender { |
206 DCHECK(certID_ != 0); | 206 DCHECK(certID_ != 0); |
207 ShowCertificateViewerByID([self parentWindow], certID_); | 207 ShowCertificateViewerByID([self parentWindow], certID_); |
208 } | 208 } |
209 | 209 |
210 - (IBAction)showHelpPage:(id)sender { | 210 - (IBAction)showHelpPage:(id)sender { |
211 GURL url = google_util::AppendGoogleLocaleParam( | 211 GURL url = google_util::AppendGoogleLocaleParam( |
212 GURL(chrome::kPageInfoHelpCenterURL)); | 212 GURL(chrome::kPageInfoHelpCenterURL)); |
213 Browser* browser = BrowserList::GetLastActive(); | 213 Browser* browser = BrowserList::GetLastActive(); |
214 browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 214 browser->OpenURL( |
| 215 url, GURL(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK); |
215 } | 216 } |
216 | 217 |
217 // This will create the subviews for the page info window. The general layout | 218 // This will create the subviews for the page info window. The general layout |
218 // is 2 or 3 boxed and titled sections, each of which has a status image to | 219 // is 2 or 3 boxed and titled sections, each of which has a status image to |
219 // provide visual feedback and a description that explains it. The description | 220 // provide visual feedback and a description that explains it. The description |
220 // text is usually only 1 or 2 lines, but can be much longer. At the bottom of | 221 // text is usually only 1 or 2 lines, but can be much longer. At the bottom of |
221 // the window is a button to view the SSL certificate, which is disabled if | 222 // the window is a button to view the SSL certificate, which is disabled if |
222 // not using HTTPS. | 223 // not using HTTPS. |
223 - (void)performLayout { | 224 - (void)performLayout { |
224 // |offset| is the Y position that should be drawn at next. | 225 // |offset| is the Y position that should be drawn at next. |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 LocationBarViewMac* locationBar = [controller locationBarBridge]; | 471 LocationBarViewMac* locationBar = [controller locationBarBridge]; |
471 if (locationBar) { | 472 if (locationBar) { |
472 NSPoint bubblePoint = locationBar->GetPageInfoBubblePoint(); | 473 NSPoint bubblePoint = locationBar->GetPageInfoBubblePoint(); |
473 origin = [parent convertBaseToScreen:bubblePoint]; | 474 origin = [parent convertBaseToScreen:bubblePoint]; |
474 } | 475 } |
475 } | 476 } |
476 return origin; | 477 return origin; |
477 } | 478 } |
478 | 479 |
479 @end | 480 @end |
OLD | NEW |