| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/panels/panel.h" | 5 #include "chrome/browser/ui/panels/panel.h" | 
| 6 | 6 | 
| 7 #include "base/logging.h" | 7 #include "base/logging.h" | 
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" | 
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" | 
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" | 
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 254 } | 254 } | 
| 255 | 255 | 
| 256 panel::Resizability Panel::CanResizeByMouse() const { | 256 panel::Resizability Panel::CanResizeByMouse() const { | 
| 257   if (!panel_strip_) | 257   if (!panel_strip_) | 
| 258     return panel::NOT_RESIZABLE; | 258     return panel::NOT_RESIZABLE; | 
| 259 | 259 | 
| 260   return panel_strip_->GetPanelResizability(this); | 260   return panel_strip_->GetPanelResizability(this); | 
| 261 } | 261 } | 
| 262 | 262 | 
| 263 void Panel::SetPanelBounds(const gfx::Rect& bounds) { | 263 void Panel::SetPanelBounds(const gfx::Rect& bounds) { | 
| 264   native_panel_->SetPanelBounds(bounds); | 264   if (bounds != native_panel_->GetPanelBounds()) | 
|  | 265     native_panel_->SetPanelBounds(bounds); | 
| 265 } | 266 } | 
| 266 | 267 | 
| 267 void Panel::SetPanelBoundsInstantly(const gfx::Rect& bounds) { | 268 void Panel::SetPanelBoundsInstantly(const gfx::Rect& bounds) { | 
| 268   native_panel_->SetPanelBoundsInstantly(bounds); | 269   native_panel_->SetPanelBoundsInstantly(bounds); | 
| 269 } | 270 } | 
| 270 | 271 | 
| 271 void Panel::LimitSizeToDisplayArea(const gfx::Rect& display_area) { | 272 void Panel::LimitSizeToDisplayArea(const gfx::Rect& display_area) { | 
| 272   int max_width = manager()->GetMaxPanelWidth(); | 273   int max_width = manager()->GetMaxPanelWidth(); | 
| 273   int max_height = manager()->GetMaxPanelHeight(); | 274   int max_height = manager()->GetMaxPanelHeight(); | 
| 274 | 275 | 
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 781 | 782 | 
| 782 void Panel::LoadingStateChanged(bool is_loading) { | 783 void Panel::LoadingStateChanged(bool is_loading) { | 
| 783   command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); | 784   command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); | 
| 784   native_panel_->UpdatePanelLoadingAnimations(is_loading); | 785   native_panel_->UpdatePanelLoadingAnimations(is_loading); | 
| 785   UpdateTitleBar(); | 786   UpdateTitleBar(); | 
| 786 } | 787 } | 
| 787 | 788 | 
| 788 void Panel::WebContentsFocused(content::WebContents* contents) { | 789 void Panel::WebContentsFocused(content::WebContents* contents) { | 
| 789   native_panel_->PanelWebContentsFocused(contents); | 790   native_panel_->PanelWebContentsFocused(contents); | 
| 790 } | 791 } | 
| OLD | NEW | 
|---|