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

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

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <Carbon/Carbon.h> 5 #include <Carbon/Carbon.h>
6 #include <stdint.h>
6 7
7 #include "build/build_config.h" 8 #include "build/build_config.h"
8 9
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/mac/mac_util.h" 14 #include "base/mac/mac_util.h"
14 #include "content/browser/browser_child_process_host_impl.h" 15 #include "content/browser/browser_child_process_host_impl.h"
15 #include "content/browser/plugin_process_host.h" 16 #include "content/browser/plugin_process_host.h"
16 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
17 #include "content/public/browser/child_process_data.h" 18 #include "content/public/browser/child_process_data.h"
18 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
19 20
20 namespace content { 21 namespace content {
21 22
22 void PluginProcessHost::OnPluginShowWindow(uint32 window_id, 23 void PluginProcessHost::OnPluginShowWindow(uint32_t window_id,
23 gfx::Rect window_rect, 24 gfx::Rect window_rect,
24 bool modal) { 25 bool modal) {
25 plugin_visible_windows_set_.insert(window_id); 26 plugin_visible_windows_set_.insert(window_id);
26 if (modal) 27 if (modal)
27 plugin_modal_windows_set_.insert(window_id); 28 plugin_modal_windows_set_.insert(window_id);
28 CGRect window_bounds = { 29 CGRect window_bounds = {
29 { window_rect.x(), window_rect.y() }, 30 { window_rect.x(), window_rect.y() },
30 { window_rect.width(), window_rect.height() } 31 { window_rect.width(), window_rect.height() }
31 }; 32 };
32 CGRect main_display_bounds = CGDisplayBounds(CGMainDisplayID()); 33 CGRect main_display_bounds = CGDisplayBounds(CGMainDisplayID());
(...skipping 17 matching lines...) Expand all
50 static void ReleasePluginFullScreen(pid_t plugin_pid) { 51 static void ReleasePluginFullScreen(pid_t plugin_pid) {
51 // Releasing full screen only works if we are the frontmost process; grab 52 // Releasing full screen only works if we are the frontmost process; grab
52 // focus, but give it back to the plugin process if requested. 53 // focus, but give it back to the plugin process if requested.
53 base::mac::ActivateProcess(base::GetCurrentProcId()); 54 base::mac::ActivateProcess(base::GetCurrentProcId());
54 base::mac::ReleaseFullScreen(base::mac::kFullScreenModeHideAll); 55 base::mac::ReleaseFullScreen(base::mac::kFullScreenModeHideAll);
55 if (plugin_pid != -1) { 56 if (plugin_pid != -1) {
56 base::mac::ActivateProcess(plugin_pid); 57 base::mac::ActivateProcess(plugin_pid);
57 } 58 }
58 } 59 }
59 60
60 void PluginProcessHost::OnPluginHideWindow(uint32 window_id, 61 void PluginProcessHost::OnPluginHideWindow(uint32_t window_id,
61 gfx::Rect window_rect) { 62 gfx::Rect window_rect) {
62 bool had_windows = !plugin_visible_windows_set_.empty(); 63 bool had_windows = !plugin_visible_windows_set_.empty();
63 plugin_visible_windows_set_.erase(window_id); 64 plugin_visible_windows_set_.erase(window_id);
64 bool browser_needs_activation = had_windows && 65 bool browser_needs_activation = had_windows &&
65 plugin_visible_windows_set_.empty(); 66 plugin_visible_windows_set_.empty();
66 67
67 plugin_modal_windows_set_.erase(window_id); 68 plugin_modal_windows_set_.erase(window_id);
68 if (plugin_fullscreen_windows_set_.find(window_id) != 69 if (plugin_fullscreen_windows_set_.find(window_id) !=
69 plugin_fullscreen_windows_set_.end()) { 70 plugin_fullscreen_windows_set_.end()) {
70 plugin_fullscreen_windows_set_.erase(window_id); 71 plugin_fullscreen_windows_set_.erase(window_id);
(...skipping 26 matching lines...) Expand all
97 void PluginProcessHost::OnPluginSetCursorVisibility(bool visible) { 98 void PluginProcessHost::OnPluginSetCursorVisibility(bool visible) {
98 if (plugin_cursor_visible_ != visible) { 99 if (plugin_cursor_visible_ != visible) {
99 plugin_cursor_visible_ = visible; 100 plugin_cursor_visible_ = visible;
100 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 101 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
101 base::Bind(base::mac::SetCursorVisibility, 102 base::Bind(base::mac::SetCursorVisibility,
102 visible)); 103 visible));
103 } 104 }
104 } 105 }
105 106
106 } // namespace content 107 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698