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

Side by Side Diff: chrome/browser/views/tab_contents/tab_contents_view_win.cc

Issue 132052: Fix for FocusManager crasher reported from the field (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/views/tab_contents/tab_contents_view_win.h" 5 #include "chrome/browser/views/tab_contents/tab_contents_view_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "app/gfx/canvas_paint.h" 9 #include "app/gfx/canvas_paint.h"
10 #include "app/os_exchange_data.h" 10 #include "app/os_exchange_data.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 319 }
320 view_storage->RemoveView(last_focused_view_storage_id_); 320 view_storage->RemoveView(last_focused_view_storage_id_);
321 } 321 }
322 } 322 }
323 323
324 void TabContentsViewWin::UpdateDragCursor(bool is_drop_target) { 324 void TabContentsViewWin::UpdateDragCursor(bool is_drop_target) {
325 drop_target_->set_is_drop_target(is_drop_target); 325 drop_target_->set_is_drop_target(is_drop_target);
326 } 326 }
327 327
328 void TabContentsViewWin::GotFocus() { 328 void TabContentsViewWin::GotFocus() {
329 tab_contents()->delegate()->TabContentsFocused(tab_contents()); 329 if (tab_contents()->delegate())
330 tab_contents()->delegate()->TabContentsFocused(tab_contents());
330 } 331 }
331 332
332 void TabContentsViewWin::TakeFocus(bool reverse) { 333 void TabContentsViewWin::TakeFocus(bool reverse) {
333 if (!tab_contents()->delegate()->TakeFocus(reverse)) { 334 if (!tab_contents()->delegate()->TakeFocus(reverse)) {
334 views::FocusManager* focus_manager = 335 views::FocusManager* focus_manager =
335 views::FocusManager::GetFocusManager(GetNativeView()); 336 views::FocusManager::GetFocusManager(GetNativeView());
336 337
337 // We may not have a focus manager if the tab has been switched before this 338 // We may not have a focus manager if the tab has been switched before this
338 // message arrived. 339 // message arrived.
339 if (focus_manager) 340 if (focus_manager)
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 } 609 }
609 return false; 610 return false;
610 } 611 }
611 612
612 void TabContentsViewWin::WheelZoom(int distance) { 613 void TabContentsViewWin::WheelZoom(int distance) {
613 if (tab_contents()->delegate()) { 614 if (tab_contents()->delegate()) {
614 bool zoom_in = distance > 0; 615 bool zoom_in = distance > 0;
615 tab_contents()->delegate()->ContentsZoomChange(zoom_in); 616 tab_contents()->delegate()->ContentsZoomChange(zoom_in);
616 } 617 }
617 } 618 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698