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/views/frame/browser_frame_win.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "base/win/metro.h" | 14 #include "base/win/metro.h" |
15 #include "chrome/app/chrome_command_ids.h" | 15 #include "chrome/app/chrome_command_ids.h" |
| 16 #include "chrome/browser/lifetime/application_lifetime.h" |
16 #include "chrome/browser/search_engines/template_url.h" | 17 #include "chrome/browser/search_engines/template_url.h" |
17 #include "chrome/browser/search_engines/template_url_service.h" | 18 #include "chrome/browser/search_engines/template_url_service.h" |
18 #include "chrome/browser/search_engines/template_url_service_factory.h" | 19 #include "chrome/browser/search_engines/template_url_service_factory.h" |
19 #include "chrome/browser/ui/browser_list.h" | |
20 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" | 20 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
21 #include "chrome/browser/ui/views/frame/browser_view.h" | 21 #include "chrome/browser/ui/views/frame/browser_view.h" |
22 #include "chrome/browser/ui/views/frame/system_menu_model.h" | 22 #include "chrome/browser/ui/views/frame/system_menu_model.h" |
23 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" | 23 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" |
24 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 24 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
25 #include "chrome/common/chrome_constants.h" | 25 #include "chrome/common/chrome_constants.h" |
26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
27 #include "content/public/browser/browser_accessibility_state.h" | 27 #include "content/public/browser/browser_accessibility_state.h" |
28 #include "content/public/browser/page_navigator.h" | 28 #include "content/public/browser/page_navigator.h" |
29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 void BrowserFrameWin::UpdateFrameAfterFrameChange() { | 162 void BrowserFrameWin::UpdateFrameAfterFrameChange() { |
163 // We need to update the glass region on or off before the base class adjusts | 163 // We need to update the glass region on or off before the base class adjusts |
164 // the window region. | 164 // the window region. |
165 UpdateDWMFrame(); | 165 UpdateDWMFrame(); |
166 NativeWidgetWin::UpdateFrameAfterFrameChange(); | 166 NativeWidgetWin::UpdateFrameAfterFrameChange(); |
167 } | 167 } |
168 | 168 |
169 void BrowserFrameWin::OnEndSession(BOOL ending, UINT logoff) { | 169 void BrowserFrameWin::OnEndSession(BOOL ending, UINT logoff) { |
170 BrowserList::SessionEnding(); | 170 browser::SessionEnding(); |
171 } | 171 } |
172 | 172 |
173 void BrowserFrameWin::OnInitMenuPopup(HMENU menu, UINT position, | 173 void BrowserFrameWin::OnInitMenuPopup(HMENU menu, UINT position, |
174 BOOL is_system_menu) { | 174 BOOL is_system_menu) { |
175 system_menu_->UpdateStates(); | 175 system_menu_->UpdateStates(); |
176 } | 176 } |
177 | 177 |
178 void BrowserFrameWin::OnWindowPosChanged(WINDOWPOS* window_pos) { | 178 void BrowserFrameWin::OnWindowPosChanged(WINDOWPOS* window_pos) { |
179 NativeWidgetWin::OnWindowPosChanged(window_pos); | 179 NativeWidgetWin::OnWindowPosChanged(window_pos); |
180 UpdateDWMFrame(); | 180 UpdateDWMFrame(); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 498 |
499 //////////////////////////////////////////////////////////////////////////////// | 499 //////////////////////////////////////////////////////////////////////////////// |
500 // NativeBrowserFrame, public: | 500 // NativeBrowserFrame, public: |
501 | 501 |
502 // static | 502 // static |
503 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 503 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
504 BrowserFrame* browser_frame, | 504 BrowserFrame* browser_frame, |
505 BrowserView* browser_view) { | 505 BrowserView* browser_view) { |
506 return new BrowserFrameWin(browser_frame, browser_view); | 506 return new BrowserFrameWin(browser_frame, browser_view); |
507 } | 507 } |
OLD | NEW |