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

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

Issue 9347042: Introduce content::RenderWidgetHostViewPort (in content/port/browser). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 8 years, 10 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_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // the Cocoa view system. It is the implementation of the RenderWidgetHostView 151 // the Cocoa view system. It is the implementation of the RenderWidgetHostView
152 // that the cross-platform RenderWidgetHost object uses 152 // that the cross-platform RenderWidgetHost object uses
153 // to display the data. 153 // to display the data.
154 // 154 //
155 // Comment excerpted from render_widget_host.h: 155 // Comment excerpted from render_widget_host.h:
156 // 156 //
157 // "The lifetime of the RenderWidgetHost* is tied to the render process. 157 // "The lifetime of the RenderWidgetHost* is tied to the render process.
158 // If the render process dies, the RenderWidgetHost* goes away and all 158 // If the render process dies, the RenderWidgetHost* goes away and all
159 // references to it must become NULL." 159 // references to it must become NULL."
160 // 160 //
161 class RenderWidgetHostViewMac : public RenderWidgetHostViewBase { 161 class RenderWidgetHostViewMac : public content::RenderWidgetHostViewBase {
162 public: 162 public:
163 virtual ~RenderWidgetHostViewMac(); 163 virtual ~RenderWidgetHostViewMac();
164 164
165 RenderWidgetHostViewCocoa* cocoa_view() const { return cocoa_view_; } 165 RenderWidgetHostViewCocoa* cocoa_view() const { return cocoa_view_; }
166 166
167 void SetDelegate(NSObject<RenderWidgetHostViewMacDelegate>* delegate); 167 void SetDelegate(NSObject<RenderWidgetHostViewMacDelegate>* delegate);
168 168
169 // RenderWidgetHostView implementation. 169 // RenderWidgetHostView implementation.
170 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; 170 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
171 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; 171 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE;
172 virtual void SetSize(const gfx::Size& size) OVERRIDE; 172 virtual void SetSize(const gfx::Size& size) OVERRIDE;
173 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; 173 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE;
174 virtual gfx::NativeView GetNativeView() const OVERRIDE; 174 virtual gfx::NativeView GetNativeView() const OVERRIDE;
175 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; 175 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE;
176 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; 176 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
177 virtual bool HasFocus() const OVERRIDE; 177 virtual bool HasFocus() const OVERRIDE;
178 virtual void Show() OVERRIDE; 178 virtual void Show() OVERRIDE;
179 virtual void Hide() OVERRIDE; 179 virtual void Hide() OVERRIDE;
180 virtual bool IsShowing() OVERRIDE; 180 virtual bool IsShowing() OVERRIDE;
181 virtual gfx::Rect GetViewBounds() const OVERRIDE; 181 virtual gfx::Rect GetViewBounds() const OVERRIDE;
182 virtual void SetShowingContextMenu(bool showing) OVERRIDE; 182 virtual void SetShowingContextMenu(bool showing) OVERRIDE;
183 virtual void SetActive(bool active) OVERRIDE; 183 virtual void SetActive(bool active) OVERRIDE;
184 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE; 184 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE;
185 virtual void SetWindowVisibility(bool visible) OVERRIDE; 185 virtual void SetWindowVisibility(bool visible) OVERRIDE;
186 virtual void WindowFrameChanged() OVERRIDE; 186 virtual void WindowFrameChanged() OVERRIDE;
187 virtual void UnhandledWheelEvent( 187 virtual void UnhandledWheelEvent(
188 const WebKit::WebMouseWheelEvent& event) OVERRIDE; 188 const WebKit::WebMouseWheelEvent& event) OVERRIDE;
189 virtual void SetBackground(const SkBitmap& background) OVERRIDE; 189 virtual void SetBackground(const SkBitmap& background) OVERRIDE;
190 190
191 // Implementation of RenderWidgetHostViewBase. 191 // Implementation of RenderWidgetHostViewPort.
192 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, 192 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
193 const gfx::Rect& pos) OVERRIDE; 193 const gfx::Rect& pos) OVERRIDE;
194 virtual void InitAsFullscreen( 194 virtual void InitAsFullscreen(
195 RenderWidgetHostView* reference_host_view) OVERRIDE; 195 RenderWidgetHostView* reference_host_view) OVERRIDE;
196 virtual void DidBecomeSelected() OVERRIDE; 196 virtual void DidBecomeSelected() OVERRIDE;
197 virtual void WasHidden() OVERRIDE; 197 virtual void WasHidden() OVERRIDE;
198 virtual void MovePluginWindows( 198 virtual void MovePluginWindows(
199 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; 199 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE;
200 virtual void Focus() OVERRIDE; 200 virtual void Focus() OVERRIDE;
201 virtual void Blur() OVERRIDE; 201 virtual void Blur() OVERRIDE;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // hidden until the software backing store has been updated. This variable is 397 // hidden until the software backing store has been updated. This variable is
398 // set when the gpu widget needs to be hidden once a paint is completed. 398 // set when the gpu widget needs to be hidden once a paint is completed.
399 bool needs_gpu_visibility_update_after_repaint_; 399 bool needs_gpu_visibility_update_after_repaint_;
400 400
401 gfx::PluginWindowHandle compositing_surface_; 401 gfx::PluginWindowHandle compositing_surface_;
402 402
403 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 403 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
404 }; 404 };
405 405
406 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 406 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698