| OLD | NEW |
| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" | 151 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 using base::TimeDelta; | 154 using base::TimeDelta; |
| 155 using content::NativeWebKeyboardEvent; | 155 using content::NativeWebKeyboardEvent; |
| 156 using content::SSLStatus; | 156 using content::SSLStatus; |
| 157 using content::UserMetricsAction; | 157 using content::UserMetricsAction; |
| 158 using content::WebContents; | 158 using content::WebContents; |
| 159 using views::ColumnSet; | 159 using views::ColumnSet; |
| 160 using views::GridLayout; | 160 using views::GridLayout; |
| 161 using web_modal::WebContentsModalDialogHost; |
| 161 | 162 |
| 162 namespace { | 163 namespace { |
| 163 // The height of the status bubble. | 164 // The height of the status bubble. |
| 164 const int kStatusBubbleHeight = 20; | 165 const int kStatusBubbleHeight = 20; |
| 165 // The name of a key to store on the window handle so that other code can | 166 // The name of a key to store on the window handle so that other code can |
| 166 // locate this object using just the handle. | 167 // locate this object using just the handle. |
| 167 const char* const kBrowserViewKey = "__BROWSER_VIEW__"; | 168 const char* const kBrowserViewKey = "__BROWSER_VIEW__"; |
| 168 | 169 |
| 169 // The number of milliseconds between loading animation frames. | 170 // The number of milliseconds between loading animation frames. |
| 170 const int kLoadingAnimationFrameTimeMs = 30; | 171 const int kLoadingAnimationFrameTimeMs = 30; |
| (...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2731 // The +1 in the next line creates a 1-px gap between icon and arrow tip. | 2732 // The +1 in the next line creates a 1-px gap between icon and arrow tip. |
| 2732 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - | 2733 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - |
| 2733 LocationBarView::kIconInternalPadding + 1); | 2734 LocationBarView::kIconInternalPadding + 1); |
| 2734 ConvertPointToTarget(location_icon_view, this, &icon_bottom); | 2735 ConvertPointToTarget(location_icon_view, this, &icon_bottom); |
| 2735 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2736 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2736 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2737 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2737 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2738 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2738 } | 2739 } |
| 2739 return top_arrow_height; | 2740 return top_arrow_height; |
| 2740 } | 2741 } |
| OLD | NEW |