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

Side by Side Diff: chrome/browser/ui/panels/panel.h

Issue 10777004: Support chrome.windows extension API events for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac unit_test failure 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 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/browser/command_updater.h" 13 #include "chrome/browser/command_updater.h"
14 #include "chrome/browser/sessions/session_id.h" 14 #include "chrome/browser/sessions/session_id.h"
15 #include "chrome/browser/ui/base_window.h" 15 #include "chrome/browser/ui/base_window.h"
16 #include "chrome/browser/ui/panels/panel_constants.h" 16 #include "chrome/browser/ui/panels/panel_constants.h"
17 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
20 20
21 class Browser; 21 class Browser;
22 class BrowserWindow; 22 class BrowserWindow;
23 class ExtensionPanelEventRouter;
23 class ExtensionWindowController; 24 class ExtensionWindowController;
24 class GURL; 25 class GURL;
25 class NativePanel; 26 class NativePanel;
26 class PanelHost; 27 class PanelHost;
27 class PanelManager; 28 class PanelManager;
28 class PanelStrip; 29 class PanelStrip;
29 class Profile; 30 class Profile;
30 class SkBitmap; 31 class SkBitmap;
31 32
32 namespace content { 33 namespace content {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 320
320 // Initialize state for all supported commands. 321 // Initialize state for all supported commands.
321 void InitCommandState(); 322 void InitCommandState();
322 323
323 // Configures the renderer for auto resize (if auto resize is enabled). 324 // Configures the renderer for auto resize (if auto resize is enabled).
324 void ConfigureAutoResize(content::WebContents* web_contents); 325 void ConfigureAutoResize(content::WebContents* web_contents);
325 326
326 // Prepares a title string for display (removes embedded newlines, etc). 327 // Prepares a title string for display (removes embedded newlines, etc).
327 static void FormatTitleForDisplay(string16* title); 328 static void FormatTitleForDisplay(string16* title);
328 329
330 // Used to send Panel window events to listeners in extension process
331 // renderers. May return NULL.
332 ExtensionPanelEventRouter* GetEventRouter();
333
329 // The application name that is also the name of the window when the 334 // The application name that is also the name of the window when the
330 // page content does not provide a title. 335 // page content does not provide a title.
331 // This name should be set when the panel is created. 336 // This name should be set when the panel is created.
332 const std::string app_name_; 337 const std::string app_name_;
333 338
334 // Current collection of panels to which this panel belongs. This determines 339 // Current collection of panels to which this panel belongs. This determines
335 // the panel's screen layout. 340 // the panel's screen layout.
336 PanelStrip* panel_strip_; // Owned by PanelManager. 341 PanelStrip* panel_strip_; // Owned by PanelManager.
337 342
338 bool initialized_; 343 bool initialized_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 380
376 content::NotificationRegistrar registrar_; 381 content::NotificationRegistrar registrar_;
377 const SessionID session_id_; 382 const SessionID session_id_;
378 scoped_ptr<ExtensionWindowController> extension_window_controller_; 383 scoped_ptr<ExtensionWindowController> extension_window_controller_;
379 scoped_ptr<PanelHost> panel_host_; 384 scoped_ptr<PanelHost> panel_host_;
380 385
381 DISALLOW_COPY_AND_ASSIGN(Panel); 386 DISALLOW_COPY_AND_ASSIGN(Panel);
382 }; 387 };
383 388
384 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ 389 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698