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

Side by Side Diff: chrome/views/native_frame_view.cc

Issue 27317: Support DWM switching.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « chrome/views/native_frame_view.h ('k') | chrome/views/non_client_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/views/native_frame_view.h"
6
7 #include "chrome/views/window.h"
8
9 namespace views {
10
11 ////////////////////////////////////////////////////////////////////////////////
12 // NativeFrameView, public:
13
14 NativeFrameView::NativeFrameView(Window* frame)
15 : NonClientFrameView(),
16 frame_(frame) {
17 }
18
19 NativeFrameView::~NativeFrameView() {
20 }
21
22 ////////////////////////////////////////////////////////////////////////////////
23 // NativeFrameView, NonClientFrameView overrides:
24
25 gfx::Rect NativeFrameView::GetBoundsForClientView() const {
26 return gfx::Rect(0, 0, width(), height());
27 }
28
29 gfx::Rect NativeFrameView::GetWindowBoundsForClientBounds(
30 const gfx::Rect& client_bounds) const {
31 RECT rect = client_bounds.ToRECT();
32 AdjustWindowRectEx(&rect, frame_->window_style(), FALSE,
33 frame_->window_ex_style());
34 return gfx::Rect(rect);
35 }
36
37 gfx::Point NativeFrameView::GetSystemMenuPoint() const {
38 POINT temp = {0, -kFrameShadowThickness };
39 MapWindowPoints(frame_->GetHWND(), HWND_DESKTOP, &temp, 1);
40 return gfx::Point(temp);
41 }
42
43 int NativeFrameView::NonClientHitTest(const gfx::Point& point) {
44 return HTNOWHERE;
45 }
46
47 void NativeFrameView::GetWindowMask(const gfx::Size& size,
48 gfx::Path* window_mask) {
49 // Nothing to do, we use the default window mask.
50 }
51
52 void NativeFrameView::EnableClose(bool enable) {
53 // Nothing to do, handled automatically by Window.
54 }
55
56 void NativeFrameView::ResetWindowControls() {
57 // Nothing to do.
58 }
59
60 } // namespace views
61
OLDNEW
« no previous file with comments | « chrome/views/native_frame_view.h ('k') | chrome/views/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698