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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_dialog.cc

Issue 10833014: Coverity fixlet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Uploaded after rebasing. Created 8 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 #include "chrome/browser/ui/views/extensions/extension_dialog.h" 5 #include "chrome/browser/ui/views/extensions/extension_dialog.h"
6 6
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/base_window.h" 10 #include "chrome/browser/ui/base_window.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void ExtensionDialog::Close() { 179 void ExtensionDialog::Close() {
180 if (!window_) 180 if (!window_)
181 return; 181 return;
182 182
183 window_->Close(); 183 window_->Close();
184 window_ = NULL; 184 window_ = NULL;
185 } 185 }
186 186
187 void ExtensionDialog::MaybeFocusRenderView() { 187 void ExtensionDialog::MaybeFocusRenderView() {
188 views::FocusManager* focus_manager = GetWidget()->GetFocusManager(); 188 views::FocusManager* focus_manager = GetWidget()->GetFocusManager();
189 DCHECK(focus_manager != NULL);
190
189 // Already there's a focused view, so no need to switch the focus. 191 // Already there's a focused view, so no need to switch the focus.
190 if (focus_manager && focus_manager->GetFocusedView()) 192 if (focus_manager->GetFocusedView())
191 return; 193 return;
192 194
193 content::RenderWidgetHostView* view = host()->render_view_host()->GetView(); 195 content::RenderWidgetHostView* view = host()->render_view_host()->GetView();
194 if (!view) 196 if (!view)
195 return; 197 return;
196 198
197 // TODO(oshima): Views + aura doesn't seem to update the views focus 199 // TODO(oshima): Views + aura doesn't seem to update the views focus
198 // manager when an aura window gets focus. This is a workaround for 200 // manager when an aura window gets focus. This is a workaround for
199 // this issue. Fix it this and remove this workaround. 201 // this issue. Fix it this and remove this workaround.
200 // See bug.com/127222. 202 // See bug.com/127222.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 if (content::Details<ExtensionHost>(host()) != details) 276 if (content::Details<ExtensionHost>(host()) != details)
275 return; 277 return;
276 if (observer_) 278 if (observer_)
277 observer_->ExtensionTerminated(this); 279 observer_->ExtensionTerminated(this);
278 break; 280 break;
279 default: 281 default:
280 NOTREACHED() << L"Received unexpected notification"; 282 NOTREACHED() << L"Received unexpected notification";
281 break; 283 break;
282 } 284 }
283 } 285 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_info_map.cc ('k') | chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698