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

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

Issue 10827259: Change panels to use gfx::Image instead of SkBitmap for favicon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: applied change to panel_titlebar_gtk.cc after syncing Created 8 years, 4 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
« no previous file with comments | « chrome/browser/ui/panels/old_panel.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 GURL; 23 class GURL;
24 class NativePanel; 24 class NativePanel;
25 class PanelHost; 25 class PanelHost;
26 class PanelManager; 26 class PanelManager;
27 class PanelStrip; 27 class PanelStrip;
28 class Profile; 28 class Profile;
29 class SkBitmap;
30 29
31 namespace content { 30 namespace content {
32 class WebContents; 31 class WebContents;
33 struct NativeWebKeyboardEvent; 32 struct NativeWebKeyboardEvent;
34 } 33 }
35 34
36 namespace extensions { 35 namespace extensions {
37 class WindowController; 36 class WindowController;
38 } 37 }
39 38
39 namespace gfx {
40 class Image;
41 }
42
40 // A platform independent implementation of BaseWindow for Panels. 43 // A platform independent implementation of BaseWindow for Panels.
41 // This class gets the first crack at all the BaseWindow calls for Panels and 44 // This class gets the first crack at all the BaseWindow calls for Panels and
42 // does one or more of the following: 45 // does one or more of the following:
43 // - Do nothing. The function is not relevant to Panels. 46 // - Do nothing. The function is not relevant to Panels.
44 // - Do Panel specific platform independent processing and then invoke the 47 // - Do Panel specific platform independent processing and then invoke the
45 // function on the platform specific member. For example, restrict panel 48 // function on the platform specific member. For example, restrict panel
46 // size to certain limits. 49 // size to certain limits.
47 // - Invoke an appropriate PanelManager function to do stuff that might affect 50 // - Invoke an appropriate PanelManager function to do stuff that might affect
48 // other Panels. For example deleting a panel would rearrange other panels. 51 // other Panels. For example deleting a panel would rearrange other panels.
49 class Panel : public BaseWindow, 52 class Panel : public BaseWindow,
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 virtual void OnWindowClosing(); 287 virtual void OnWindowClosing();
285 288
286 // Executes a command if it's enabled. 289 // Executes a command if it's enabled.
287 // Returns true if the command is executed. 290 // Returns true if the command is executed.
288 bool ExecuteCommandIfEnabled(int id); 291 bool ExecuteCommandIfEnabled(int id);
289 292
290 // Gets the title of the window from the web contents. 293 // Gets the title of the window from the web contents.
291 string16 GetWindowTitle() const; 294 string16 GetWindowTitle() const;
292 295
293 // Gets the Favicon of the web contents. 296 // Gets the Favicon of the web contents.
294 virtual SkBitmap GetCurrentPageIcon() const; 297 virtual gfx::Image GetCurrentPageIcon() const;
295 298
296 // Updates the title bar to display the current title and icon. 299 // Updates the title bar to display the current title and icon.
297 void UpdateTitleBar(); 300 void UpdateTitleBar();
298 301
299 // Updates UI to reflect change in loading state. 302 // Updates UI to reflect change in loading state.
300 void LoadingStateChanged(bool is_loading); 303 void LoadingStateChanged(bool is_loading);
301 304
302 // Updates UI to reflect that the web cotents receives the focus. 305 // Updates UI to reflect that the web cotents receives the focus.
303 void WebContentsFocused(content::WebContents* contents); 306 void WebContentsFocused(content::WebContents* contents);
304 307
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 385
383 content::NotificationRegistrar registrar_; 386 content::NotificationRegistrar registrar_;
384 const SessionID session_id_; 387 const SessionID session_id_;
385 scoped_ptr<extensions::WindowController> extension_window_controller_; 388 scoped_ptr<extensions::WindowController> extension_window_controller_;
386 scoped_ptr<PanelHost> panel_host_; 389 scoped_ptr<PanelHost> panel_host_;
387 390
388 DISALLOW_COPY_AND_ASSIGN(Panel); 391 DISALLOW_COPY_AND_ASSIGN(Panel);
389 }; 392 };
390 393
391 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ 394 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/old_panel.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698