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

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

Issue 11498008: RenderWidget popup should be a NSWindow so it can go outside the main window. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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
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 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 virtual void WindowFrameChanged() OVERRIDE; 222 virtual void WindowFrameChanged() OVERRIDE;
223 virtual void ShowDefinitionForSelection() OVERRIDE; 223 virtual void ShowDefinitionForSelection() OVERRIDE;
224 virtual bool SupportsSpeech() const OVERRIDE; 224 virtual bool SupportsSpeech() const OVERRIDE;
225 virtual void SpeakSelection() OVERRIDE; 225 virtual void SpeakSelection() OVERRIDE;
226 virtual bool IsSpeaking() const OVERRIDE; 226 virtual bool IsSpeaking() const OVERRIDE;
227 virtual void StopSpeaking() OVERRIDE; 227 virtual void StopSpeaking() OVERRIDE;
228 virtual void SetBackground(const SkBitmap& background) OVERRIDE; 228 virtual void SetBackground(const SkBitmap& background) OVERRIDE;
229 229
230 // Implementation of RenderWidgetHostViewPort. 230 // Implementation of RenderWidgetHostViewPort.
231 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, 231 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
232 const gfx::Rect& pos) OVERRIDE; 232 const gfx::Rect& pos,
233 WebContentsViewDelegate* delegate) OVERRIDE;
233 virtual void InitAsFullscreen( 234 virtual void InitAsFullscreen(
234 RenderWidgetHostView* reference_host_view) OVERRIDE; 235 RenderWidgetHostView* reference_host_view) OVERRIDE;
235 virtual void WasShown() OVERRIDE; 236 virtual void WasShown() OVERRIDE;
236 virtual void WasHidden() OVERRIDE; 237 virtual void WasHidden() OVERRIDE;
237 virtual void MovePluginWindows( 238 virtual void MovePluginWindows(
238 const gfx::Vector2d& scroll_offset, 239 const gfx::Vector2d& scroll_offset,
239 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; 240 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE;
240 virtual void Focus() OVERRIDE; 241 virtual void Focus() OVERRIDE;
241 virtual void Blur() OVERRIDE; 242 virtual void Blur() OVERRIDE;
242 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; 243 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 470
470 // The text to be shown in the tooltip, supplied by the renderer. 471 // The text to be shown in the tooltip, supplied by the renderer.
471 string16 tooltip_text_; 472 string16 tooltip_text_;
472 473
473 // Factory used to safely scope delayed calls to ShutdownHost(). 474 // Factory used to safely scope delayed calls to ShutdownHost().
474 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 475 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
475 476
476 // selected text on the renderer. 477 // selected text on the renderer.
477 std::string selected_text_; 478 std::string selected_text_;
478 479
480 // The window used for popup widgets.
481 scoped_nsobject<NSWindow> popup_window_;
482
479 // The fullscreen window used for pepper flash. 483 // The fullscreen window used for pepper flash.
480 scoped_nsobject<NSWindow> pepper_fullscreen_window_; 484 scoped_nsobject<NSWindow> pepper_fullscreen_window_;
481 scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_; 485 scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_;
482 // Our parent host view, if this is fullscreen. NULL otherwise. 486 // Our parent host view, if this is fullscreen. NULL otherwise.
483 RenderWidgetHostViewMac* fullscreen_parent_host_view_; 487 RenderWidgetHostViewMac* fullscreen_parent_host_view_;
484 488
485 // List of pending swaps for deferred acking: 489 // List of pending swaps for deferred acking:
486 // pairs of (route_id, gpu_host_id). 490 // pairs of (route_id, gpu_host_id).
487 std::list<std::pair<int32, int32> > pending_swap_buffers_acks_; 491 std::list<std::pair<int32, int32> > pending_swap_buffers_acks_;
488 492
489 // The current composition character range and its bounds. 493 // The current composition character range and its bounds.
490 ui::Range composition_range_; 494 ui::Range composition_range_;
491 std::vector<gfx::Rect> composition_bounds_; 495 std::vector<gfx::Rect> composition_bounds_;
492 496
493 // The current caret bounds. 497 // The current caret bounds.
494 gfx::Rect caret_rect_; 498 gfx::Rect caret_rect_;
495 499
496 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 500 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
497 }; 501 };
498 502
499 } // namespace content 503 } // namespace content
500 504
501 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 505 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698