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

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

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/mac/mac_util.h" 12 #include "base/mac/mac_util.h"
13 #include "base/mac/scoped_cftyperef.h" 13 #include "base/mac/scoped_cftyperef.h"
14 #import "base/mac/scoped_nsautorelease_pool.h" 14 #import "base/mac/scoped_nsautorelease_pool.h"
15 #import "base/memory/scoped_nsobject.h" 15 #import "base/memory/scoped_nsobject.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/sys_info.h" 18 #include "base/sys_info.h"
19 #include "base/sys_string_conversions.h" 19 #include "base/sys_string_conversions.h"
20 #include "base/utf_string_conversions.h" 20 #include "base/utf_string_conversions.h"
21 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 21 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
22 #include "content/browser/gpu/gpu_process_host.h" 22 #include "content/browser/gpu/gpu_process_host.h"
23 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 23 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
24 #include "content/browser/mac/closure_blocks_leopard_compat.h" 24 #include "content/browser/mac/closure_blocks_leopard_compat.h"
25 #include "content/browser/plugin_process_host.h" 25 #include "content/browser/plugin_process_host.h"
26 #import "content/browser/renderer_host/accelerated_plugin_view_mac.h" 26 #import "content/browser/renderer_host/accelerated_plugin_view_mac.h"
27 #include "content/browser/renderer_host/backing_store_mac.h" 27 #include "content/browser/renderer_host/backing_store_mac.h"
28 #include "content/browser/renderer_host/render_process_host.h" 28 #include "content/browser/renderer_host/render_process_host_impl.h"
29 #include "content/browser/renderer_host/render_view_host.h" 29 #include "content/browser/renderer_host/render_view_host.h"
30 #import "content/browser/renderer_host/render_widget_host_view_mac_delegate.h" 30 #import "content/browser/renderer_host/render_widget_host_view_mac_delegate.h"
31 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h" 31 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h"
32 #import "content/browser/renderer_host/text_input_client_mac.h" 32 #import "content/browser/renderer_host/text_input_client_mac.h"
33 #include "content/common/edit_command.h" 33 #include "content/common/edit_command.h"
34 #include "content/common/gpu/gpu_messages.h" 34 #include "content/common/gpu/gpu_messages.h"
35 #include "content/common/plugin_messages.h" 35 #include "content/common/plugin_messages.h"
36 #include "content/common/view_messages.h" 36 #include "content/common/view_messages.h"
37 #include "content/public/browser/browser_thread.h" 37 #include "content/public/browser/browser_thread.h"
38 #include "content/public/browser/native_web_keyboard_event.h" 38 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 void RenderWidgetHostViewMac::AcknowledgeSwapBuffers( 923 void RenderWidgetHostViewMac::AcknowledgeSwapBuffers(
924 int renderer_id, 924 int renderer_id,
925 int32 route_id, 925 int32 route_id,
926 int gpu_host_id) { 926 int gpu_host_id) {
927 TRACE_EVENT0("gpu", "RenderWidgetHostViewMac::AcknowledgeSwapBuffers"); 927 TRACE_EVENT0("gpu", "RenderWidgetHostViewMac::AcknowledgeSwapBuffers");
928 // Called on the display link thread. Hand actual work off to the IO thread, 928 // Called on the display link thread. Hand actual work off to the IO thread,
929 // because |GpuProcessHost::Get()| can only be called there. 929 // because |GpuProcessHost::Get()| can only be called there.
930 // Currently, this is never called for plugins. 930 // Currently, this is never called for plugins.
931 if (render_widget_host_) { 931 if (render_widget_host_) {
932 DCHECK_EQ(render_widget_host_->process()->id(), renderer_id); 932 DCHECK_EQ(render_widget_host_->process()->GetID(), renderer_id);
933 // |render_widget_host_->routing_id()| and |route_id| are usually not 933 // |render_widget_host_->routing_id()| and |route_id| are usually not
934 // equal: The former identifies the channel from the RWH in the browser 934 // equal: The former identifies the channel from the RWH in the browser
935 // process to the corresponding render widget in the renderer process, while 935 // process to the corresponding render widget in the renderer process, while
936 // the latter identifies the channel from the GpuCommandBufferStub in the 936 // the latter identifies the channel from the GpuCommandBufferStub in the
937 // GPU process to the corresponding command buffer client in the renderer. 937 // GPU process to the corresponding command buffer client in the renderer.
938 } 938 }
939 939
940 // TODO(apatrick): Send the acknowledgement via the UI thread when running in 940 // TODO(apatrick): Send the acknowledgement via the UI thread when running in
941 // single process or in process GPU mode for now. This is bad from a 941 // single process or in process GPU mode for now. This is bad from a
942 // performance point of view but the plan is to not use AcceleratedSurface at 942 // performance point of view but the plan is to not use AcceleratedSurface at
(...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after
2745 if (!string) return NO; 2745 if (!string) return NO;
2746 2746
2747 // If the user is currently using an IME, confirm the IME input, 2747 // If the user is currently using an IME, confirm the IME input,
2748 // and then insert the text from the service, the same as TextEdit and Safari. 2748 // and then insert the text from the service, the same as TextEdit and Safari.
2749 [self confirmComposition]; 2749 [self confirmComposition];
2750 [self insertText:string]; 2750 [self insertText:string];
2751 return YES; 2751 return YES;
2752 } 2752 }
2753 2753
2754 @end 2754 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698