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

Side by Side Diff: chrome/browser/plugin_process_host_mac.cc

Issue 257008: Fix several issues around fullscreen Mac plugins:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <Carbon/Carbon.h>
6
7 #include "build/build_config.h"
8
9 #include <vector>
10
11 #include "base/logging.h"
12 #include "chrome/browser/plugin_process_host.h"
13
14 void PluginProcessHost::OnPluginSelectWindow(uint32 window_id,
15 gfx::Rect window_rect) {
16 plugin_visible_windows_set_.insert(window_id);
17 }
18
19 void PluginProcessHost::OnPluginShowWindow(uint32 window_id,
20 gfx::Rect window_rect) {
21 plugin_visible_windows_set_.insert(window_id);
22 CGRect window_bounds = {
23 { window_rect.x(), window_rect.y() },
24 { window_rect.width(), window_rect.height() }
25 };
26 CGRect main_display_bounds = CGDisplayBounds(CGMainDisplayID());
27 if (CGRectEqualToRect(window_bounds, main_display_bounds)) {
28 // If the plugin has just shown a window that's the same dimensions as
29 // the main display, hide the menubar so that it has the whole screen.
30 SetSystemUIMode(kUIModeAllSuppressed, kUIOptionAutoShowMenuBar);
31 }
32 }
33
34 void PluginProcessHost::OnPluginHideWindow(uint32 window_id,
35 gfx::Rect window_rect) {
36 plugin_visible_windows_set_.erase(window_id);
37 SetSystemUIMode(kUIModeNormal, 0);
stuartmorgan 2009/10/01 17:17:10 I wonder if we need to track full-screen and non-f
Amanda Walker 2009/10/01 17:21:02 Ah, I'd forgotten about browser-side fullscreen mo
38 }
39
40 void PluginProcessHost::OnPluginDisposeWindow(uint32 window_id,
41 gfx::Rect window_rect) {
42 plugin_visible_windows_set_.erase(window_id);
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698