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

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

Issue 6927058: Merge 83125 - Add and use gfx::ScopedNSGraphicsContextState (ui/gfx/scoped_ns_graphics_context_st... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/742/src/
Patch Set: Created 9 years, 7 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
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 <QuartzCore/QuartzCore.h> 5 #include <QuartzCore/QuartzCore.h>
6 6
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
11 #import "base/mac/scoped_nsautorelease_pool.h" 11 #import "base/mac/scoped_nsautorelease_pool.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #import "base/memory/scoped_nsobject.h" 13 #import "base/memory/scoped_nsobject.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/sys_info.h" 15 #include "base/sys_info.h"
16 #include "base/sys_string_conversions.h" 16 #include "base/sys_string_conversions.h"
17 #import "chrome/browser/accessibility/browser_accessibility_cocoa.h" 17 #import "chrome/browser/accessibility/browser_accessibility_cocoa.h"
18 #include "chrome/browser/accessibility/browser_accessibility_state.h" 18 #include "chrome/browser/accessibility/browser_accessibility_state.h"
19 #include "chrome/browser/browser_trial.h" 19 #include "chrome/browser/browser_trial.h"
20 #include "chrome/browser/gpu_process_host_ui_shim.h" 20 #include "chrome/browser/gpu_process_host_ui_shim.h"
21 #import "chrome/browser/renderer_host/accelerated_plugin_view_mac.h" 21 #import "chrome/browser/renderer_host/accelerated_plugin_view_mac.h"
22 #import "chrome/browser/renderer_host/text_input_client_mac.h"
23 #include "chrome/browser/spellchecker_platform_engine.h" 22 #include "chrome/browser/spellchecker_platform_engine.h"
24 #import "chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h" 23 #import "chrome/browser/ui/cocoa/rwhvm_editcommand_helper.h"
25 #import "chrome/browser/ui/cocoa/view_id_util.h" 24 #import "chrome/browser/ui/cocoa/view_id_util.h"
26 #include "chrome/common/render_messages.h" 25 #include "chrome/common/render_messages.h"
27 #include "content/browser/browser_thread.h" 26 #include "content/browser/browser_thread.h"
28 #include "content/browser/gpu_process_host.h" 27 #include "content/browser/gpu_process_host.h"
29 #include "content/browser/plugin_process_host.h" 28 #include "content/browser/plugin_process_host.h"
30 #include "content/browser/renderer_host/backing_store_mac.h" 29 #include "content/browser/renderer_host/backing_store_mac.h"
31 #include "content/browser/renderer_host/render_process_host.h" 30 #include "content/browser/renderer_host/render_process_host.h"
32 #include "content/browser/renderer_host/render_view_host.h" 31 #include "content/browser/renderer_host/render_view_host.h"
33 #include "content/browser/renderer_host/render_widget_host.h" 32 #include "content/browser/renderer_host/render_widget_host.h"
34 #include "content/common/edit_command.h" 33 #include "content/common/edit_command.h"
35 #include "content/common/gpu_messages.h" 34 #include "content/common/gpu_messages.h"
36 #include "content/common/native_web_keyboard_event.h" 35 #include "content/common/native_web_keyboard_event.h"
37 #include "content/common/plugin_messages.h" 36 #include "content/common/plugin_messages.h"
38 #include "content/common/view_messages.h" 37 #include "content/common/view_messages.h"
39 #include "skia/ext/platform_canvas.h" 38 #include "skia/ext/platform_canvas.h"
40 #import "third_party/mozilla/ComplexTextInputPanel.h" 39 #import "third_party/mozilla/ComplexTextInputPanel.h"
41 #include "third_party/skia/include/core/SkColor.h" 40 #include "third_party/skia/include/core/SkColor.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFact ory.h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFact ory.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
44 #include "ui/gfx/point.h" 43 #include "ui/gfx/point.h"
44 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
45 #include "ui/gfx/surface/io_surface_support_mac.h" 45 #include "ui/gfx/surface/io_surface_support_mac.h"
46 #include "webkit/glue/webaccessibility.h" 46 #include "webkit/glue/webaccessibility.h"
47 #include "webkit/plugins/npapi/webplugin.h" 47 #include "webkit/plugins/npapi/webplugin.h"
48 48
49 using WebKit::WebInputEvent; 49 using WebKit::WebInputEvent;
50 using WebKit::WebInputEventFactory; 50 using WebKit::WebInputEventFactory;
51 using WebKit::WebMouseEvent; 51 using WebKit::WebMouseEvent;
52 using WebKit::WebMouseWheelEvent; 52 using WebKit::WebMouseWheelEvent;
53 53
54 static inline int ToWebKitModifiers(NSUInteger flags) { 54 static inline int ToWebKitModifiers(NSUInteger flags) {
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 if (!string) return NO; 2508 if (!string) return NO;
2509 2509
2510 // If the user is currently using an IME, confirm the IME input, 2510 // If the user is currently using an IME, confirm the IME input,
2511 // and then insert the text from the service, the same as TextEdit and Safari. 2511 // and then insert the text from the service, the same as TextEdit and Safari.
2512 [self confirmComposition]; 2512 [self confirmComposition];
2513 [self insertText:string]; 2513 [self insertText:string];
2514 return YES; 2514 return YES;
2515 } 2515 }
2516 2516
2517 @end 2517 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698