| 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 "chrome/browser/views/frame/browser_frame.h" | 5 #include "chrome/browser/views/frame/browser_frame.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 /////////////////////////////////////////////////////////////////////////////// | 22 /////////////////////////////////////////////////////////////////////////////// |
| 23 // BrowserFrame, public: | 23 // BrowserFrame, public: |
| 24 | 24 |
| 25 BrowserFrame::BrowserFrame(BrowserView* browser_view) | 25 BrowserFrame::BrowserFrame(BrowserView* browser_view) |
| 26 : Window(browser_view), | 26 : Window(browser_view), |
| 27 browser_view_(browser_view), | 27 browser_view_(browser_view), |
| 28 frame_initialized_(false) { | 28 frame_initialized_(false) { |
| 29 browser_view_->set_frame(this); | 29 browser_view_->set_frame(this); |
| 30 non_client_view_->SetFrameView(CreateFrameViewForWindow()); | 30 non_client_view_->SetFrameView(CreateFrameViewForWindow()); |
| 31 // Don't focus anything on creation, selecting a tab will set the focus. |
| 32 set_focus_on_creation(false); |
| 31 } | 33 } |
| 32 | 34 |
| 33 BrowserFrame::~BrowserFrame() { | 35 BrowserFrame::~BrowserFrame() { |
| 34 } | 36 } |
| 35 | 37 |
| 36 void BrowserFrame::Init() { | 38 void BrowserFrame::Init() { |
| 37 Window::Init(NULL, gfx::Rect()); | 39 Window::Init(NULL, gfx::Rect()); |
| 38 } | 40 } |
| 39 | 41 |
| 40 int BrowserFrame::GetMinimizeButtonOffset() const { | 42 int BrowserFrame::GetMinimizeButtonOffset() const { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } | 215 } |
| 214 // In maximized mode, we only have a titlebar strip of glass, no side/bottom | 216 // In maximized mode, we only have a titlebar strip of glass, no side/bottom |
| 215 // borders. | 217 // borders. |
| 216 if (!browser_view_->IsFullscreen()) { | 218 if (!browser_view_->IsFullscreen()) { |
| 217 margins.cyTopHeight = | 219 margins.cyTopHeight = |
| 218 GetBoundsForTabStrip(browser_view_->tabstrip()).bottom(); | 220 GetBoundsForTabStrip(browser_view_->tabstrip()).bottom(); |
| 219 } | 221 } |
| 220 DwmExtendFrameIntoClientArea(GetHWND(), &margins); | 222 DwmExtendFrameIntoClientArea(GetHWND(), &margins); |
| 221 } | 223 } |
| 222 | 224 |
| OLD | NEW |