OLD | NEW |
---|---|
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/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 | 184 |
185 void ExtensionDialog::MaybeFocusRenderView() { | 185 void ExtensionDialog::MaybeFocusRenderView() { |
186 views::FocusManager* focus_manager = GetWidget()->GetFocusManager(); | 186 views::FocusManager* focus_manager = GetWidget()->GetFocusManager(); |
187 // Already there's a focused view, so no need to switch the focus. | 187 // Already there's a focused view, so no need to switch the focus. |
188 if (focus_manager && focus_manager->GetFocusedView()) | 188 if (focus_manager && focus_manager->GetFocusedView()) |
189 return; | 189 return; |
190 | 190 |
191 content::RenderWidgetHostView* view = host()->render_view_host()->GetView(); | 191 content::RenderWidgetHostView* view = host()->render_view_host()->GetView(); |
192 if (!view) | 192 if (!view) |
193 return; | 193 return; |
194 | 194 |
oshima
2012/06/22 14:34:41
can you please add
// TODO(oshima): Views + aura d
SeRya
2012/06/22 14:45:27
Done.
| |
195 focus_manager->SetFocusedView(GetContentsView()); | |
195 view->Focus(); | 196 view->Focus(); |
196 } | 197 } |
197 | 198 |
198 ///////////////////////////////////////////////////////////////////////////// | 199 ///////////////////////////////////////////////////////////////////////////// |
199 // views::WidgetDelegate overrides. | 200 // views::WidgetDelegate overrides. |
200 | 201 |
201 bool ExtensionDialog::CanResize() const { | 202 bool ExtensionDialog::CanResize() const { |
202 return false; | 203 return false; |
203 } | 204 } |
204 | 205 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 if (content::Details<ExtensionHost>(host()) != details) | 263 if (content::Details<ExtensionHost>(host()) != details) |
263 return; | 264 return; |
264 if (observer_) | 265 if (observer_) |
265 observer_->ExtensionTerminated(this); | 266 observer_->ExtensionTerminated(this); |
266 break; | 267 break; |
267 default: | 268 default: |
268 NOTREACHED() << L"Received unexpected notification"; | 269 NOTREACHED() << L"Received unexpected notification"; |
269 break; | 270 break; |
270 } | 271 } |
271 } | 272 } |
OLD | NEW |