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

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

Issue 18009003: Instant Extended: Delete unused overlay code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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) 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 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat e.h" 5 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat e.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import "base/mac/sdk_forward_declarations.h" 9 #import "base/mac/sdk_forward_declarations.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
12 #include "chrome/browser/devtools/devtools_window.h" 12 #include "chrome/browser/devtools/devtools_window.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" 14 #include "chrome/browser/spellchecker/spellcheck_platform_mac.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_commands.h" 16 #include "chrome/browser/ui/browser_commands.h"
17 #include "chrome/browser/ui/browser_finder.h" 17 #include "chrome/browser/ui/browser_finder.h"
18 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 18 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
19 #import "chrome/browser/ui/cocoa/history_overlay_controller.h" 19 #import "chrome/browser/ui/cocoa/history_overlay_controller.h"
20 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
21 #import "chrome/browser/ui/cocoa/view_id_util.h" 20 #import "chrome/browser/ui/cocoa/view_id_util.h"
22 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
23 #include "chrome/common/spellcheck_messages.h" 22 #include "chrome/common/spellcheck_messages.h"
24 #include "chrome/common/url_constants.h" 23 #include "chrome/common/url_constants.h"
25 #include "content/public/browser/render_process_host.h" 24 #include "content/public/browser/render_process_host.h"
26 #include "content/public/browser/render_view_host.h" 25 #include "content/public/browser/render_view_host.h"
27 #include "content/public/browser/render_view_host_observer.h" 26 #include "content/public/browser/render_view_host_observer.h"
28 #include "content/public/browser/render_widget_host.h" 27 #include "content/public/browser/render_widget_host.h"
29 #include "content/public/browser/render_widget_host_view.h" 28 #include "content/public/browser/render_widget_host_view.h"
30 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 spellcheckChecked_ ? NSOnState : NSOffState; 272 spellcheckChecked_ ? NSOnState : NSOffState;
274 [(id)item setState:checkedState]; 273 [(id)item setState:checkedState];
275 } 274 }
276 *valid = spellcheckEnabled_; 275 *valid = spellcheckEnabled_;
277 return YES; 276 return YES;
278 } 277 }
279 278
280 return NO; 279 return NO;
281 } 280 }
282 281
283 - (void)compositingIOSurfaceCreated {
284 NSView* nativeView = renderWidgetHost_->GetView()->GetNativeView();
285 BrowserWindowController* windowController =
286 [BrowserWindowController browserWindowControllerForView:nativeView];
287 [[windowController overlayableContentsController]
288 activeContentsCompositingIOSurfaceCreated];
289 }
290
291 // Spellchecking methods 282 // Spellchecking methods
292 // The next five methods are implemented here since this class is the first 283 // The next five methods are implemented here since this class is the first
293 // responder for anything in the browser. 284 // responder for anything in the browser.
294 285
295 // This message is sent whenever the user specifies that a word should be 286 // This message is sent whenever the user specifies that a word should be
296 // changed from the spellChecker. 287 // changed from the spellChecker.
297 - (void)changeSpelling:(id)sender { 288 - (void)changeSpelling:(id)sender {
298 // Grab the currently selected word from the spell panel, as this is the word 289 // Grab the currently selected word from the spell panel, as this is the word
299 // that we want to replace the selected word in the text with. 290 // that we want to replace the selected word in the text with.
300 NSString* newWord = [[sender selectedCell] stringValue]; 291 NSString* newWord = [[sender selectedCell] stringValue];
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 333 }
343 334
344 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked { 335 - (void)spellCheckEnabled:(BOOL)enabled checked:(BOOL)checked {
345 spellcheckEnabled_ = enabled; 336 spellcheckEnabled_ = enabled;
346 spellcheckChecked_ = checked; 337 spellcheckChecked_ = checked;
347 } 338 }
348 339
349 // END Spellchecking methods 340 // END Spellchecking methods
350 341
351 @end 342 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698