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 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" | 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
6 | 6 |
7 #include "chrome/browser/themes/theme_service.h" | 7 #include "chrome/browser/themes/theme_service.h" |
8 #include "chrome/browser/ui/panels/panel.h" | 8 #include "chrome/browser/ui/panels/panel.h" |
9 #include "chrome/browser/ui/panels/panel_browser_view.h" | 9 #include "chrome/browser/ui/panels/panel_browser_view.h" |
10 #include "chrome/browser/ui/panels/panel_manager.h" | 10 #include "chrome/browser/ui/panels/panel_manager.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 int PanelBrowserFrameView::NonClientHitTest(const gfx::Point& point) { | 219 int PanelBrowserFrameView::NonClientHitTest(const gfx::Point& point) { |
220 if (!bounds().Contains(point)) | 220 if (!bounds().Contains(point)) |
221 return HTNOWHERE; | 221 return HTNOWHERE; |
222 | 222 |
223 int frame_component = | 223 int frame_component = |
224 frame_->client_view()->NonClientHitTest(point); | 224 frame_->client_view()->NonClientHitTest(point); |
225 if (frame_component != HTNOWHERE) | 225 if (frame_component != HTNOWHERE) |
226 return frame_component; | 226 return frame_component; |
227 | 227 |
228 if (close_button_->IsVisible() && | 228 if (close_button_->visible() && |
229 close_button_->GetMirroredBounds().Contains(point)) | 229 close_button_->GetMirroredBounds().Contains(point)) |
230 return HTCLOSE; | 230 return HTCLOSE; |
231 | 231 |
232 int window_component = GetHTComponentForFrame(point, | 232 int window_component = GetHTComponentForFrame(point, |
233 NonClientBorderThickness(), NonClientBorderThickness(), | 233 NonClientBorderThickness(), NonClientBorderThickness(), |
234 0, 0, | 234 0, 0, |
235 frame_->window_delegate()->CanResize()); | 235 frame_->window_delegate()->CanResize()); |
236 // Fall back to the caption if no other component matches. | 236 // Fall back to the caption if no other component matches. |
237 return (window_component == HTNOWHERE) ? HTCAPTION : window_component; | 237 return (window_component == HTNOWHERE) ? HTCAPTION : window_component; |
238 } | 238 } |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 } | 474 } |
475 | 475 |
476 void PanelBrowserFrameView::UpdateTitleBar() { | 476 void PanelBrowserFrameView::UpdateTitleBar() { |
477 title_label_->SetText( | 477 title_label_->SetText( |
478 frame_->window_delegate()->GetWindowTitle()); | 478 frame_->window_delegate()->GetWindowTitle()); |
479 } | 479 } |
480 | 480 |
481 void PanelBrowserFrameView::OnActivationChanged(bool active) { | 481 void PanelBrowserFrameView::OnActivationChanged(bool active) { |
482 SchedulePaint(); | 482 SchedulePaint(); |
483 } | 483 } |
OLD | NEW |