| 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 return static_cast<BrowserView*>(browser->window()); | 534 return static_cast<BrowserView*>(browser->window()); |
| 535 } | 535 } |
| 536 | 536 |
| 537 void BrowserView::InitStatusBubble() { | 537 void BrowserView::InitStatusBubble() { |
| 538 status_bubble_.reset(new StatusBubbleViews(contents_web_view_)); | 538 status_bubble_.reset(new StatusBubbleViews(contents_web_view_)); |
| 539 contents_web_view_->SetStatusBubble(status_bubble_.get()); | 539 contents_web_view_->SetStatusBubble(status_bubble_.get()); |
| 540 } | 540 } |
| 541 | 541 |
| 542 void BrowserView::InitPermissionBubbleView() { | 542 void BrowserView::InitPermissionBubbleView() { |
| 543 permission_bubble_view_.reset(new PermissionBubbleViewViews( | 543 permission_bubble_view_.reset(new PermissionBubbleViewViews( |
| 544 GetLocationBarView()->location_icon_view())); | 544 GetLocationBarView()->location_icon_view(), browser_->profile())); |
| 545 } | 545 } |
| 546 | 546 |
| 547 gfx::Rect BrowserView::GetToolbarBounds() const { | 547 gfx::Rect BrowserView::GetToolbarBounds() const { |
| 548 gfx::Rect toolbar_bounds(toolbar_->bounds()); | 548 gfx::Rect toolbar_bounds(toolbar_->bounds()); |
| 549 if (toolbar_bounds.IsEmpty()) | 549 if (toolbar_bounds.IsEmpty()) |
| 550 return toolbar_bounds; | 550 return toolbar_bounds; |
| 551 // The apparent toolbar edges are outside the "real" toolbar edges. | 551 // The apparent toolbar edges are outside the "real" toolbar edges. |
| 552 toolbar_bounds.Inset(-views::NonClientFrameView::kClientEdgeThickness, 0); | 552 toolbar_bounds.Inset(-views::NonClientFrameView::kClientEdgeThickness, 0); |
| 553 return toolbar_bounds; | 553 return toolbar_bounds; |
| 554 } | 554 } |
| (...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2570 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| 2571 gfx::Point icon_bottom( | 2571 gfx::Point icon_bottom( |
| 2572 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2572 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| 2573 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2573 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| 2574 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr)); | 2574 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr)); |
| 2575 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2575 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2576 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2576 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2577 } | 2577 } |
| 2578 return top_arrow_height; | 2578 return top_arrow_height; |
| 2579 } | 2579 } |
| OLD | NEW |