Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/browser/ui/views/constrained_window_win.cc

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code cleanup Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/views/constrained_window_win.h" 5 #include "chrome/browser/ui/views/constrained_window_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/win/win_util.h"
10 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
11 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/tab_contents/tab_contents.h" 11 #include "chrome/browser/tab_contents/tab_contents.h"
13 #include "chrome/browser/tab_contents/tab_contents_view.h" 12 #include "chrome/browser/tab_contents/tab_contents_view.h"
14 #include "chrome/browser/ui/toolbar/toolbar_model.h" 13 #include "chrome/browser/ui/toolbar/toolbar_model.h"
15 #include "chrome/browser/ui/views/frame/browser_view.h" 14 #include "chrome/browser/ui/views/frame/browser_view.h"
16 #include "chrome/browser/ui/window_sizer.h" 15 #include "chrome/browser/ui/window_sizer.h"
17 #include "chrome/common/chrome_constants.h" 16 #include "chrome/common/chrome_constants.h"
18 #include "chrome/common/notification_service.h" 17 #include "chrome/common/notification_service.h"
19 #include "gfx/canvas.h" 18 #include "gfx/canvas.h"
20 #include "gfx/font.h" 19 #include "gfx/font.h"
21 #include "gfx/path.h" 20 #include "gfx/path.h"
22 #include "gfx/rect.h" 21 #include "gfx/rect.h"
23 #include "grit/app_resources.h" 22 #include "grit/app_resources.h"
24 #include "grit/chromium_strings.h" 23 #include "grit/chromium_strings.h"
25 #include "grit/generated_resources.h" 24 #include "grit/generated_resources.h"
26 #include "grit/theme_resources.h" 25 #include "grit/theme_resources.h"
27 #include "net/base/net_util.h" 26 #include "net/base/net_util.h"
28 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
29 #include "ui/base/win/hwnd_util.h" 28 #include "ui/base/win/hwnd_util.h"
30 #include "views/controls/button/image_button.h" 29 #include "views/controls/button/image_button.h"
31 #include "views/focus/focus_manager.h" 30 #include "views/focus/focus_manager.h"
32 #include "views/window/client_view.h" 31 #include "views/window/client_view.h"
33 #include "views/window/non_client_view.h" 32 #include "views/window/non_client_view.h"
34 #include "views/window/window_resources.h" 33 #include "views/window/window_resources.h"
35 #include "views/window/window_shape.h" 34 #include "views/window/window_shape.h"
35 #include "views/window/window_win.h"
36 36
37 using base::TimeDelta; 37 using base::TimeDelta;
38 38
39 namespace views { 39 namespace views {
40 class ClientView; 40 class ClientView;
41 } 41 }
42 42
43 // An enumeration of bitmap resources used by this window. 43 // An enumeration of bitmap resources used by this window.
44 enum { 44 enum {
45 FRAME_PART_BITMAP_FIRST = 0, // Must be first. 45 FRAME_PART_BITMAP_FIRST = 0, // Must be first.
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 void ConstrainedWindowFrameView::InitWindowResources() { 537 void ConstrainedWindowFrameView::InitWindowResources() {
538 resources_.reset(ui::ShouldUseVistaFrame() ? 538 resources_.reset(ui::ShouldUseVistaFrame() ?
539 static_cast<views::WindowResources*>(new VistaWindowResources) : 539 static_cast<views::WindowResources*>(new VistaWindowResources) :
540 new XPWindowResources); 540 new XPWindowResources);
541 } 541 }
542 542
543 // static 543 // static
544 void ConstrainedWindowFrameView::InitClass() { 544 void ConstrainedWindowFrameView::InitClass() {
545 static bool initialized = false; 545 static bool initialized = false;
546 if (!initialized) { 546 if (!initialized) {
547 title_font_ = new gfx::Font(app::win::GetWindowTitleFont()); 547 title_font_ = new gfx::Font(views::WindowWin::GetWindowTitleFont());
548 initialized = true; 548 initialized = true;
549 } 549 }
550 } 550 }
551 551
552 //////////////////////////////////////////////////////////////////////////////// 552 ////////////////////////////////////////////////////////////////////////////////
553 // ConstrainedWindowWin, public: 553 // ConstrainedWindowWin, public:
554 554
555 ConstrainedWindowWin::~ConstrainedWindowWin() { 555 ConstrainedWindowWin::~ConstrainedWindowWin() {
556 } 556 }
557 557
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 671
672 672
673 // static 673 // static
674 ConstrainedWindow* ConstrainedWindow::CreateConstrainedDialog( 674 ConstrainedWindow* ConstrainedWindow::CreateConstrainedDialog(
675 TabContents* parent, 675 TabContents* parent,
676 views::WindowDelegate* window_delegate) { 676 views::WindowDelegate* window_delegate) {
677 ConstrainedWindowWin* window = new ConstrainedWindowWin(parent, 677 ConstrainedWindowWin* window = new ConstrainedWindowWin(parent,
678 window_delegate); 678 window_delegate);
679 return window; 679 return window;
680 } 680 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698