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

Side by Side Diff: ui/views/widget/desktop_root_window_host_win.cc

Issue 10958005: Trivial plumbing of some methods from DesktopNativeWidgetAura to DesktopRootWindowHost. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
« no previous file with comments | « ui/views/widget/desktop_root_window_host_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/views/widget/desktop_root_window_host_win.h" 5 #include "ui/views/widget/desktop_root_window_host_win.h"
6 6
7 #include "third_party/skia/include/core/SkPath.h" 7 #include "third_party/skia/include/core/SkPath.h"
8 #include "third_party/skia/include/core/SkRegion.h" 8 #include "third_party/skia/include/core/SkRegion.h"
9 #include "ui/aura/desktop/desktop_activation_client.h" 9 #include "ui/aura/desktop/desktop_activation_client.h"
10 #include "ui/aura/desktop/desktop_cursor_client.h" 10 #include "ui/aura/desktop/desktop_cursor_client.h"
11 #include "ui/aura/desktop/desktop_dispatcher_client.h" 11 #include "ui/aura/desktop/desktop_dispatcher_client.h"
12 #include "ui/aura/focus_manager.h" 12 #include "ui/aura/focus_manager.h"
13 #include "ui/aura/root_window.h" 13 #include "ui/aura/root_window.h"
14 #include "ui/aura/shared/compound_event_filter.h" 14 #include "ui/aura/shared/compound_event_filter.h"
15 #include "ui/base/cursor/cursor_loader_win.h" 15 #include "ui/base/cursor/cursor_loader_win.h"
16 #include "ui/base/win/shell.h" 16 #include "ui/base/win/shell.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 #include "ui/gfx/path_win.h" 18 #include "ui/gfx/path_win.h"
19 #include "ui/views/ime/input_method_win.h" 19 #include "ui/views/ime/input_method_win.h"
20 #include "ui/views/widget/desktop_capture_client.h" 20 #include "ui/views/widget/desktop_capture_client.h"
21 #include "ui/views/widget/desktop_screen_position_client.h" 21 #include "ui/views/widget/desktop_screen_position_client.h"
22 #include "ui/views/widget/widget_delegate.h" 22 #include "ui/views/widget/widget_delegate.h"
23 #include "ui/views/win/fullscreen_handler.h"
23 #include "ui/views/win/hwnd_message_handler.h" 24 #include "ui/views/win/hwnd_message_handler.h"
24 #include "ui/views/window/native_frame_view.h" 25 #include "ui/views/window/native_frame_view.h"
25 26
26 namespace views { 27 namespace views {
27 28
28 //////////////////////////////////////////////////////////////////////////////// 29 ////////////////////////////////////////////////////////////////////////////////
29 // DesktopRootWindowHostWin, public: 30 // DesktopRootWindowHostWin, public:
30 31
31 DesktopRootWindowHostWin::DesktopRootWindowHostWin( 32 DesktopRootWindowHostWin::DesktopRootWindowHostWin(
32 internal::NativeWidgetDelegate* native_widget_delegate, 33 internal::NativeWidgetDelegate* native_widget_delegate,
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 238
238 void DesktopRootWindowHostWin::FrameTypeChanged() { 239 void DesktopRootWindowHostWin::FrameTypeChanged() {
239 message_handler_->FrameTypeChanged(); 240 message_handler_->FrameTypeChanged();
240 } 241 }
241 242
242 NonClientFrameView* DesktopRootWindowHostWin::CreateNonClientFrameView() { 243 NonClientFrameView* DesktopRootWindowHostWin::CreateNonClientFrameView() {
243 return GetWidget()->ShouldUseNativeFrame() ? 244 return GetWidget()->ShouldUseNativeFrame() ?
244 new NativeFrameView(GetWidget()) : NULL; 245 new NativeFrameView(GetWidget()) : NULL;
245 } 246 }
246 247
248 void DesktopRootWindowHostWin::SetFullscreen(bool fullscreen) {
249 message_handler_->fullscreen_handler()->SetFullscreen(fullscreen);
250 }
251
252 bool DesktopRootWindowHostWin::IsFullscreen() const {
253 return message_handler_->fullscreen_handler()->fullscreen();
254 }
255
256 void DesktopRootWindowHostWin::SetOpacity(unsigned char opacity) {
257 message_handler_->SetOpacity(static_cast<BYTE>(opacity));
258 GetWidget()->GetRootView()->SchedulePaint();
259 }
260
261 void DesktopRootWindowHostWin::SetWindowIcons(
262 const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) {
263 message_handler_->SetWindowIcons(window_icon, app_icon);
264 }
265
266 void DesktopRootWindowHostWin::SetAccessibleName(const string16& name) {
267 message_handler_->SetAccessibleName(name);
268 }
269
270 void DesktopRootWindowHostWin::SetAccessibleRole(
271 ui::AccessibilityTypes::Role role) {
272 message_handler_->SetAccessibleRole(role);
273 }
274
275 void DesktopRootWindowHostWin::SetAccessibleState(
276 ui::AccessibilityTypes::State state) {
277 message_handler_->SetAccessibleState(state);
278 }
279
280 void DesktopRootWindowHostWin::InitModalType(ui::ModalType modal_type) {
281 message_handler_->InitModalType(modal_type);
282 }
283
284 void DesktopRootWindowHostWin::FlashFrame(bool flash_frame) {
285 message_handler_->FlashFrame(flash_frame);
286 }
287
247 //////////////////////////////////////////////////////////////////////////////// 288 ////////////////////////////////////////////////////////////////////////////////
248 // DesktopRootWindowHostWin, RootWindowHost implementation: 289 // DesktopRootWindowHostWin, RootWindowHost implementation:
249 290
250 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() { 291 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() {
251 return root_window_.get(); 292 return root_window_.get();
252 } 293 }
253 294
254 gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() { 295 gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() {
255 return message_handler_->hwnd(); 296 return message_handler_->hwnd();
256 } 297 }
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 // DesktopRootWindowHost, public: 684 // DesktopRootWindowHost, public:
644 685
645 // static 686 // static
646 DesktopRootWindowHost* DesktopRootWindowHost::Create( 687 DesktopRootWindowHost* DesktopRootWindowHost::Create(
647 internal::NativeWidgetDelegate* native_widget_delegate, 688 internal::NativeWidgetDelegate* native_widget_delegate,
648 const gfx::Rect& initial_bounds) { 689 const gfx::Rect& initial_bounds) {
649 return new DesktopRootWindowHostWin(native_widget_delegate, initial_bounds); 690 return new DesktopRootWindowHostWin(native_widget_delegate, initial_bounds);
650 } 691 }
651 692
652 } // namespace views 693 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_root_window_host_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698