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

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

Issue 1815593002: Remove windowed NPAPI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_test_plugin_windowless
Patch Set: fix compile Created 4 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
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_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // a popup (such as a <select> dropdown), then shows the popup at |pos|. 248 // a popup (such as a <select> dropdown), then shows the popup at |pos|.
249 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, 249 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
250 const gfx::Rect& bounds) = 0; 250 const gfx::Rect& bounds) = 0;
251 251
252 // Perform all the initialization steps necessary for this object to represent 252 // Perform all the initialization steps necessary for this object to represent
253 // a full screen window. 253 // a full screen window.
254 // |reference_host_view| is the view associated with the creating page that 254 // |reference_host_view| is the view associated with the creating page that
255 // helps to position the full screen widget on the correct monitor. 255 // helps to position the full screen widget on the correct monitor.
256 virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0; 256 virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
257 257
258 // Moves all plugin windows as described in the given list.
259 // |scroll_offset| is the scroll offset of the render view.
260 virtual void MovePluginWindows(
261 const std::vector<WebPluginGeometry>& moves) = 0;
262
263 // Sets the cursor to the one associated with the specified cursor_type 258 // Sets the cursor to the one associated with the specified cursor_type
264 virtual void UpdateCursor(const WebCursor& cursor) = 0; 259 virtual void UpdateCursor(const WebCursor& cursor) = 0;
265 260
266 // Indicates whether the page has finished loading. 261 // Indicates whether the page has finished loading.
267 virtual void SetIsLoading(bool is_loading) = 0; 262 virtual void SetIsLoading(bool is_loading) = 0;
268 263
269 // Updates the state of the input method attached to the view. 264 // Updates the state of the input method attached to the view.
270 virtual void TextInputStateChanged( 265 virtual void TextInputStateChanged(
271 const ViewHostMsg_TextInputState_Params& params) = 0; 266 const ViewHostMsg_TextInputState_Params& params) = 0;
272 267
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 const gfx::Range& range, 375 const gfx::Range& range,
381 const std::vector<gfx::Rect>& character_bounds) = 0; 376 const std::vector<gfx::Rect>& character_bounds) = 0;
382 377
383 #if defined(OS_WIN) 378 #if defined(OS_WIN)
384 virtual void SetParentNativeViewAccessible( 379 virtual void SetParentNativeViewAccessible(
385 gfx::NativeViewAccessible accessible_parent) = 0; 380 gfx::NativeViewAccessible accessible_parent) = 0;
386 381
387 // Returns an HWND that's given as the parent window for windowless Flash to 382 // Returns an HWND that's given as the parent window for windowless Flash to
388 // workaround crbug.com/301548. 383 // workaround crbug.com/301548.
389 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0; 384 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0;
390
391 // The callback that DetachPluginsHelper calls for each child window. Call
392 // this directly if you want to do custom filtering on plugin windows first.
393 static void DetachPluginWindowsCallback(HWND window);
394 #endif 385 #endif
395 386
396 // Add and remove observers for lifetime event notifications. The order in 387 // Add and remove observers for lifetime event notifications. The order in
397 // which notifications are sent to observers is undefined. Clients must be 388 // which notifications are sent to observers is undefined. Clients must be
398 // sure to remove the observer before they go away. 389 // sure to remove the observer before they go away.
399 void AddObserver(RenderWidgetHostViewBaseObserver* observer); 390 void AddObserver(RenderWidgetHostViewBaseObserver* observer);
400 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer); 391 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer);
401 392
402 // Exposed for testing. 393 // Exposed for testing.
403 virtual cc::SurfaceId SurfaceIdForTesting() const; 394 virtual cc::SurfaceId SurfaceIdForTesting() const;
404 395
405 protected: 396 protected:
406 // Interface class only, do not construct. 397 // Interface class only, do not construct.
407 RenderWidgetHostViewBase(); 398 RenderWidgetHostViewBase();
408 399
409 void NotifyObserversAboutShutdown(); 400 void NotifyObserversAboutShutdown();
410 401
411 #if defined(OS_WIN)
412 // Shared implementation of MovePluginWindows for use by win and aura/wina.
413 static void MovePluginWindowsHelper(
414 HWND parent,
415 const std::vector<WebPluginGeometry>& moves);
416
417 static void PaintPluginWindowsHelper(
418 HWND parent,
419 const gfx::Rect& damaged_screen_rect);
420
421 // Needs to be called before the HWND backing the view goes away to avoid
422 // crashes in Windowed plugins.
423 static void DetachPluginsHelper(HWND parent);
424 #endif
425
426 // Whether this view is a popup and what kind of popup it is (select, 402 // Whether this view is a popup and what kind of popup it is (select,
427 // autofill...). 403 // autofill...).
428 blink::WebPopupType popup_type_; 404 blink::WebPopupType popup_type_;
429 405
430 // The background color of the web content. 406 // The background color of the web content.
431 SkColor background_color_; 407 SkColor background_color_;
432 408
433 // While the mouse is locked, the cursor is hidden from the user. Mouse events 409 // While the mouse is locked, the cursor is hidden from the user. Mouse events
434 // are still generated. However, the position they report is the last known 410 // are still generated. However, the position they report is the last known
435 // mouse position just as mouse lock was entered; the movement they report 411 // mouse position just as mouse lock was entered; the movement they report
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 449 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
474 450
475 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 451 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
476 452
477 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 453 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
478 }; 454 };
479 455
480 } // namespace content 456 } // namespace content
481 457
482 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 458 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698