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

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

Issue 10880064: Make extension commands grant the activeTab permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 3 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/shell_window_views.h" 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 extension()->id()); 338 extension()->id());
339 ui::win::SetAppIdForWindow( 339 ui::win::SetAppIdForWindow(
340 ShellIntegration::GetAppModelIdForProfile( 340 ShellIntegration::GetAppModelIdForProfile(
341 UTF8ToWide(app_name), shell_window_->profile()->GetPath()), 341 UTF8ToWide(app_name), shell_window_->profile()->GetPath()),
342 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); 342 GetWidget()->GetTopLevelWidget()->GetNativeWindow());
343 #endif 343 #endif
344 344
345 extension_keybinding_registry_.reset( 345 extension_keybinding_registry_.reset(
346 new ExtensionKeybindingRegistryViews(shell_window_->profile(), 346 new ExtensionKeybindingRegistryViews(shell_window_->profile(),
347 window_->GetFocusManager(), 347 window_->GetFocusManager(),
348 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY)); 348 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
349 shell_window_));
349 350
350 OnViewWasResized(); 351 OnViewWasResized();
351 352
352 window_->Show(); 353 window_->Show();
353 } 354 }
354 355
355 views::View* ShellWindowViews::GetInitiallyFocusedView() { 356 views::View* ShellWindowViews::GetInitiallyFocusedView() {
356 return web_view_; 357 return web_view_;
357 } 358 }
358 359
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 ui::WindowShowState show_state) { 652 ui::WindowShowState show_state) {
652 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); 653 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state);
653 shell_window_->SaveWindowPosition(); 654 shell_window_->SaveWindowPosition();
654 } 655 }
655 656
656 // static 657 // static
657 NativeShellWindow* NativeShellWindow::Create( 658 NativeShellWindow* NativeShellWindow::Create(
658 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 659 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
659 return new ShellWindowViews(shell_window, params); 660 return new ShellWindowViews(shell_window, params);
660 } 661 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_keybinding_registry_views.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698