| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 | 6 |
| 7 #include "chrome/browser/views/frame/browser_view.h" | 7 #include "chrome/browser/views/frame/browser_view.h" |
| 8 | 8 |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "chrome/views/window.h" | 50 #include "chrome/views/window.h" |
| 51 | 51 |
| 52 #include "chromium_strings.h" | 52 #include "chromium_strings.h" |
| 53 #include "generated_resources.h" | 53 #include "generated_resources.h" |
| 54 | 54 |
| 55 using base::TimeDelta; | 55 using base::TimeDelta; |
| 56 | 56 |
| 57 // static | 57 // static |
| 58 SkBitmap BrowserView::default_favicon_; | 58 SkBitmap BrowserView::default_favicon_; |
| 59 SkBitmap BrowserView::otr_avatar_; | 59 SkBitmap BrowserView::otr_avatar_; |
| 60 const int BrowserView::kClientEdgeThickness = 1; |
| 60 // The vertical overlap between the TabStrip and the Toolbar. | 61 // The vertical overlap between the TabStrip and the Toolbar. |
| 61 static const int kToolbarTabStripVerticalOverlap = 3; | 62 static const int kToolbarTabStripVerticalOverlap = 3; |
| 62 // The visible height of the shadow above the tabs. Clicks in this area are | 63 // The visible height of the shadow above the tabs. Clicks in this area are |
| 63 // treated as clicks to the frame, rather than clicks to the tab. | 64 // treated as clicks to the frame, rather than clicks to the tab. |
| 64 static const int kTabShadowSize = 2; | 65 static const int kTabShadowSize = 2; |
| 65 // The height of the status bubble. | 66 // The height of the status bubble. |
| 66 static const int kStatusBubbleHeight = 20; | 67 static const int kStatusBubbleHeight = 20; |
| 67 // The overlap of the status bubble with the left edge of the window. | 68 // The overlap of the status bubble with the left edge of the window. |
| 68 static const int kStatusBubbleHorizontalOverlap = 2; | 69 static const int kStatusBubbleHorizontalOverlap = 2; |
| 69 // The overlap of the status bubble with the bottom edge of the window. | 70 // The overlap of the status bubble with the bottom edge of the window. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 194 |
| 194 bool BrowserView::IsToolbarVisible() const { | 195 bool BrowserView::IsToolbarVisible() const { |
| 195 return SupportsWindowFeature(FEATURE_TOOLBAR) || | 196 return SupportsWindowFeature(FEATURE_TOOLBAR) || |
| 196 SupportsWindowFeature(FEATURE_LOCATIONBAR); | 197 SupportsWindowFeature(FEATURE_LOCATIONBAR); |
| 197 } | 198 } |
| 198 | 199 |
| 199 bool BrowserView::IsTabStripVisible() const { | 200 bool BrowserView::IsTabStripVisible() const { |
| 200 return SupportsWindowFeature(FEATURE_TABSTRIP); | 201 return SupportsWindowFeature(FEATURE_TABSTRIP); |
| 201 } | 202 } |
| 202 | 203 |
| 204 bool BrowserView::IsToolbarDisplayModeNormal() const { |
| 205 return toolbar_->IsDisplayModeNormal(); |
| 206 } |
| 207 |
| 203 bool BrowserView::IsOffTheRecord() const { | 208 bool BrowserView::IsOffTheRecord() const { |
| 204 return browser_->profile()->IsOffTheRecord(); | 209 return browser_->profile()->IsOffTheRecord(); |
| 205 } | 210 } |
| 206 | 211 |
| 207 bool BrowserView::ShouldShowOffTheRecordAvatar() const { | 212 bool BrowserView::ShouldShowOffTheRecordAvatar() const { |
| 208 return IsOffTheRecord() && browser_->type() == Browser::TYPE_NORMAL; | 213 return IsOffTheRecord() && browser_->type() == Browser::TYPE_NORMAL; |
| 209 } | 214 } |
| 210 | 215 |
| 211 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { | 216 bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 212 DCHECK(accelerator_table_.get()); | 217 DCHECK(accelerator_table_.get()); |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 | 1391 |
| 1387 // static | 1392 // static |
| 1388 void BrowserView::InitClass() { | 1393 void BrowserView::InitClass() { |
| 1389 static bool initialized = false; | 1394 static bool initialized = false; |
| 1390 if (!initialized) { | 1395 if (!initialized) { |
| 1391 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 1396 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 1392 default_favicon_ = *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); | 1397 default_favicon_ = *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); |
| 1393 initialized = true; | 1398 initialized = true; |
| 1394 } | 1399 } |
| 1395 } | 1400 } |
| OLD | NEW |