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

Side by Side Diff: chrome/browser/ui/gtk/extensions/shell_window_gtk.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/gtk/extensions/shell_window_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/shell_window_gtk.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h" 9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 g_signal_connect(window_, "configure-event", 107 g_signal_connect(window_, "configure-event",
108 G_CALLBACK(OnConfigureThunk), this); 108 G_CALLBACK(OnConfigureThunk), this);
109 g_signal_connect(window_, "window-state-event", 109 g_signal_connect(window_, "window-state-event",
110 G_CALLBACK(OnWindowStateThunk), this); 110 G_CALLBACK(OnWindowStateThunk), this);
111 if (frameless_) { 111 if (frameless_) {
112 g_signal_connect(window_, "button-press-event", 112 g_signal_connect(window_, "button-press-event",
113 G_CALLBACK(OnButtonPressThunk), this); 113 G_CALLBACK(OnButtonPressThunk), this);
114 } 114 }
115 115
116 // Add the keybinding registry. 116 // Add the keybinding registry.
117 extension_keybinding_registry_.reset( 117 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryGtk(
118 new ExtensionKeybindingRegistryGtk(shell_window_->profile(), window_, 118 shell_window_->profile(),
119 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY)); 119 window_,
120 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
121 shell_window_));
120 122
121 ui::ActiveWindowWatcherX::AddObserver(this); 123 ui::ActiveWindowWatcherX::AddObserver(this);
122 } 124 }
123 125
124 ShellWindowGtk::~ShellWindowGtk() { 126 ShellWindowGtk::~ShellWindowGtk() {
125 ui::ActiveWindowWatcherX::RemoveObserver(this); 127 ui::ActiveWindowWatcherX::RemoveObserver(this);
126 } 128 }
127 129
128 bool ShellWindowGtk::IsActive() const { 130 bool ShellWindowGtk::IsActive() const {
129 return is_active_; 131 return is_active_;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 373 }
372 374
373 draggable_region_ = draggable_region; 375 draggable_region_ = draggable_region;
374 } 376 }
375 377
376 // static 378 // static
377 NativeShellWindow* NativeShellWindow::Create( 379 NativeShellWindow* NativeShellWindow::Create(
378 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 380 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
379 return new ShellWindowGtk(shell_window, params); 381 return new ShellWindowGtk(shell_window, params);
380 } 382 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698