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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.h

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 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 | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
(...skipping 13 matching lines...) Expand all
24 #include "content/common/content_export.h" 24 #include "content/common/content_export.h"
25 #include "content/public/browser/notification_observer.h" 25 #include "content/public/browser/notification_observer.h"
26 #include "content/public/browser/notification_registrar.h" 26 #include "content/public/browser/notification_registrar.h"
27 #include "ui/base/win/ime_input.h" 27 #include "ui/base/win/ime_input.h"
28 #include "ui/gfx/native_widget_types.h" 28 #include "ui/gfx/native_widget_types.h"
29 #include "ui/gfx/point.h" 29 #include "ui/gfx/point.h"
30 #include "ui/gfx/surface/accelerated_surface_win.h" 30 #include "ui/gfx/surface/accelerated_surface_win.h"
31 #include "webkit/glue/webcursor.h" 31 #include "webkit/glue/webcursor.h"
32 32
33 class BackingStore; 33 class BackingStore;
34 class SkRegion;
35
36 namespace content {
34 class RenderWidgetHost; 37 class RenderWidgetHost;
35 class SkRegion; 38 }
36 39
37 namespace gfx { 40 namespace gfx {
38 class Size; 41 class Size;
39 class Rect; 42 class Rect;
40 } 43 }
41 44
42 namespace IPC { 45 namespace IPC {
43 class Message; 46 class Message;
44 } 47 }
45 48
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate) 148 MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate)
146 MESSAGE_HANDLER(WM_GETOBJECT, OnGetObject) 149 MESSAGE_HANDLER(WM_GETOBJECT, OnGetObject)
147 MESSAGE_HANDLER(WM_PARENTNOTIFY, OnParentNotify) 150 MESSAGE_HANDLER(WM_PARENTNOTIFY, OnParentNotify)
148 MESSAGE_HANDLER(WM_POINTERDOWN, OnPointerMessage) 151 MESSAGE_HANDLER(WM_POINTERDOWN, OnPointerMessage)
149 MESSAGE_HANDLER(WM_POINTERUP, OnPointerMessage) 152 MESSAGE_HANDLER(WM_POINTERUP, OnPointerMessage)
150 MESSAGE_HANDLER(WM_GESTURE, OnGestureEvent) 153 MESSAGE_HANDLER(WM_GESTURE, OnGestureEvent)
151 END_MSG_MAP() 154 END_MSG_MAP()
152 155
153 // RenderWidgetHostView implementation. 156 // RenderWidgetHostView implementation.
154 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; 157 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
155 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; 158 virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE;
156 virtual void SetSize(const gfx::Size& size) OVERRIDE; 159 virtual void SetSize(const gfx::Size& size) OVERRIDE;
157 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; 160 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE;
158 virtual gfx::NativeView GetNativeView() const OVERRIDE; 161 virtual gfx::NativeView GetNativeView() const OVERRIDE;
159 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; 162 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE;
160 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; 163 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
161 virtual bool HasFocus() const OVERRIDE; 164 virtual bool HasFocus() const OVERRIDE;
162 virtual void Show() OVERRIDE; 165 virtual void Show() OVERRIDE;
163 virtual void Hide() OVERRIDE; 166 virtual void Hide() OVERRIDE;
164 virtual bool IsShowing() OVERRIDE; 167 virtual bool IsShowing() OVERRIDE;
165 virtual gfx::Rect GetViewBounds() const OVERRIDE; 168 virtual gfx::Rect GetViewBounds() const OVERRIDE;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 int acc_obj_id, gfx::Point point) OVERRIDE; 235 int acc_obj_id, gfx::Point point) OVERRIDE;
233 virtual void AccessibilitySetTextSelection( 236 virtual void AccessibilitySetTextSelection(
234 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; 237 int acc_obj_id, int start_offset, int end_offset) OVERRIDE;
235 238
236 protected: 239 protected:
237 friend class content::RenderWidgetHostView; 240 friend class content::RenderWidgetHostView;
238 241
239 // Should construct only via RenderWidgetHostView::CreateViewForWidget. 242 // Should construct only via RenderWidgetHostView::CreateViewForWidget.
240 // 243 //
241 // The view will associate itself with the given widget. 244 // The view will associate itself with the given widget.
242 explicit RenderWidgetHostViewWin(RenderWidgetHost* widget); 245 explicit RenderWidgetHostViewWin(content::RenderWidgetHost* widget);
243 246
244 // Windows Message Handlers 247 // Windows Message Handlers
245 LRESULT OnCreate(CREATESTRUCT* create_struct); 248 LRESULT OnCreate(CREATESTRUCT* create_struct);
246 void OnActivate(UINT, BOOL, HWND); 249 void OnActivate(UINT, BOOL, HWND);
247 void OnDestroy(); 250 void OnDestroy();
248 void OnPaint(HDC unused_dc); 251 void OnPaint(HDC unused_dc);
249 void OnNCPaint(HRGN update_region); 252 void OnNCPaint(HRGN update_region);
250 LRESULT OnNCHitTest(const CPoint& pt); 253 LRESULT OnNCHitTest(const CPoint& pt);
251 LRESULT OnEraseBkgnd(HDC dc); 254 LRESULT OnEraseBkgnd(HDC dc);
252 LRESULT OnSetCursor(HWND window, UINT hittest_code, UINT mouse_message_id); 255 LRESULT OnSetCursor(HWND window, UINT hittest_code, UINT mouse_message_id);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 378
376 // Set window to receive gestures. 379 // Set window to receive gestures.
377 void SetToGestureMode(); 380 void SetToGestureMode();
378 381
379 // Set window to raw touch events. Returns whether registering was successful. 382 // Set window to raw touch events. Returns whether registering was successful.
380 bool SetToTouchMode(); 383 bool SetToTouchMode();
381 384
382 // The associated Model. While |this| is being Destroyed, 385 // The associated Model. While |this| is being Destroyed,
383 // |render_widget_host_| is NULL and the Windows message loop is run one last 386 // |render_widget_host_| is NULL and the Windows message loop is run one last
384 // time. Message handlers must check for a NULL |render_widget_host_|. 387 // time. Message handlers must check for a NULL |render_widget_host_|.
385 RenderWidgetHostImpl* render_widget_host_; 388 content::RenderWidgetHostImpl* render_widget_host_;
386 389
387 // When we are doing accelerated compositing 390 // When we are doing accelerated compositing
388 HWND compositor_host_window_; 391 HWND compositor_host_window_;
389 392
390 // Presents a texture received from another process to the compositing 393 // Presents a texture received from another process to the compositing
391 // window. 394 // window.
392 scoped_ptr<AcceleratedSurface> accelerated_surface_; 395 scoped_ptr<AcceleratedSurface> accelerated_surface_;
393 396
394 // true if the compositor host window must be hidden after the 397 // true if the compositor host window must be hidden after the
395 // software renderered view is updated. 398 // software renderered view is updated.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Region in which the view will be transparent to clicks. 560 // Region in which the view will be transparent to clicks.
558 scoped_ptr<SkRegion> transparent_region_; 561 scoped_ptr<SkRegion> transparent_region_;
559 562
560 // Are touch events currently enabled? 563 // Are touch events currently enabled?
561 bool touch_events_enabled_; 564 bool touch_events_enabled_;
562 565
563 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); 566 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin);
564 }; 567 };
565 568
566 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 569 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698