Commit dfb70b27 authored by sky@chromium.org's avatar sky@chromium.org

Gets TabIconView compiling on linux.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/115905

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17210 0039d316-1c4b-4281-b951-d872f2087c98
parent c675add6
...@@ -4,20 +4,26 @@ ...@@ -4,20 +4,26 @@
#include "chrome/browser/views/tab_icon_view.h" #include "chrome/browser/views/tab_icon_view.h"
#if defined(OS_WIN)
#include <windows.h> #include <windows.h>
#include <shellapi.h> #include <shellapi.h>
#endif
#include "app/gfx/canvas.h" #include "app/gfx/canvas.h"
#include "app/gfx/favicon_size.h" #include "app/gfx/favicon_size.h"
#include "app/gfx/icon_util.h"
#include "app/resource_bundle.h" #include "app/resource_bundle.h"
#include "base/file_util.h" #include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "chrome/app/chrome_dll_resource.h" #include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents.h"
#include "grit/app_resources.h" #include "grit/app_resources.h"
#include "grit/theme_resources.h" #include "grit/theme_resources.h"
#if defined(OS_WIN)
#include "app/gfx/icon_util.h"
#endif
static bool g_initialized = false; static bool g_initialized = false;
static SkBitmap* g_default_fav_icon = NULL; static SkBitmap* g_default_fav_icon = NULL;
static SkBitmap* g_throbber_frames = NULL; static SkBitmap* g_throbber_frames = NULL;
...@@ -29,6 +35,7 @@ void TabIconView::InitializeIfNeeded() { ...@@ -29,6 +35,7 @@ void TabIconView::InitializeIfNeeded() {
if (!g_initialized) { if (!g_initialized) {
ResourceBundle &rb = ResourceBundle::GetSharedInstance(); ResourceBundle &rb = ResourceBundle::GetSharedInstance();
#if defined(OS_WIN)
// The default window icon is the application icon, not the default // The default window icon is the application icon, not the default
// favicon. // favicon.
std::wstring exe_path; std::wstring exe_path;
...@@ -38,6 +45,9 @@ void TabIconView::InitializeIfNeeded() { ...@@ -38,6 +45,9 @@ void TabIconView::InitializeIfNeeded() {
g_default_fav_icon = g_default_fav_icon =
IconUtil::CreateSkBitmapFromHICON(app_icon, gfx::Size(16, 16)); IconUtil::CreateSkBitmapFromHICON(app_icon, gfx::Size(16, 16));
DestroyIcon(app_icon); DestroyIcon(app_icon);
#else
NOTIMPLEMENTED();
#endif
g_throbber_frames = rb.GetBitmapNamed(IDR_THROBBER); g_throbber_frames = rb.GetBitmapNamed(IDR_THROBBER);
g_throbber_frames_light = rb.GetBitmapNamed(IDR_THROBBER_LIGHT); g_throbber_frames_light = rb.GetBitmapNamed(IDR_THROBBER_LIGHT);
...@@ -53,8 +63,8 @@ void TabIconView::InitializeIfNeeded() { ...@@ -53,8 +63,8 @@ void TabIconView::InitializeIfNeeded() {
TabIconView::TabIconView(TabIconViewModel* model) TabIconView::TabIconView(TabIconViewModel* model)
: model_(model), : model_(model),
is_light_(false),
throbber_running_(false), throbber_running_(false),
is_light_(false),
throbber_frame_(0) { throbber_frame_(0) {
InitializeIfNeeded(); InitializeIfNeeded();
} }
......
...@@ -1764,6 +1764,8 @@ ...@@ -1764,6 +1764,8 @@
['include', '^browser/views/tab_contents/native_tab_contents_container_gtk.h'], ['include', '^browser/views/tab_contents/native_tab_contents_container_gtk.h'],
['include', '^browser/views/tab_contents/tab_contents_container.cc'], ['include', '^browser/views/tab_contents/tab_contents_container.cc'],
['include', '^browser/views/tab_contents/tab_contents_container.h'], ['include', '^browser/views/tab_contents/tab_contents_container.h'],
['include', '^browser/views/tab_icon_view.cc'],
['include', '^browser/views/tab_icon_view.h'],
['include', '^browser/views/tabs/dragged_tab_view.cc'], ['include', '^browser/views/tabs/dragged_tab_view.cc'],
['include', '^browser/views/tabs/dragged_tab_view.h'], ['include', '^browser/views/tabs/dragged_tab_view.h'],
['include', '^browser/views/tabs/tab.cc'], ['include', '^browser/views/tabs/tab.cc'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment